summaryrefslogtreecommitdiff
path: root/ext/bg/js/audio-downloader.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-01-07 21:36:20 -0500
committerGitHub <noreply@github.com>2021-01-07 21:36:20 -0500
commitb20622b2c84ce3ca1781c7bf8e10fed0af1e5001 (patch)
tree938cdc95f289cdfd482aff77a6ebe44aff80e889 /ext/bg/js/audio-downloader.js
parent7d706df66b4cd68d6ac430c2e3e8b9f3a7f4b6ae (diff)
Core refactor (#1207)
* Copy set intersection functions * Remove unused functions * Simplify url check * Remove parseUrl * Simplify stringReverse * Remove hasOwn due to infrequent use * Rename errorToJson/jsonToError to de/serializeError For clarity on intended use. * Fix time argument on timeout * Add missing return value * Throw an error for unexpected argument values * Add documentation comments
Diffstat (limited to 'ext/bg/js/audio-downloader.js')
-rw-r--r--ext/bg/js/audio-downloader.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/bg/js/audio-downloader.js b/ext/bg/js/audio-downloader.js
index 9b34be56..19e9c368 100644
--- a/ext/bg/js/audio-downloader.js
+++ b/ext/bg/js/audio-downloader.js
@@ -189,7 +189,7 @@ class AudioDownloader {
throw new Error('No custom URL defined');
}
const data = {expression, reading};
- const url = customSourceUrl.replace(/\{([^}]*)\}/g, (m0, m1) => (hasOwn(data, m1) ? `${data[m1]}` : m0));
+ const url = customSourceUrl.replace(/\{([^}]*)\}/g, (m0, m1) => (Object.prototype.hasOwnProperty.call(data, m1) ? `${data[m1]}` : m0));
return {type: 'url', details: {url}};
}