From 16217728afe0f9ff7dcbb7c7b7ead454ccc8705f Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 6 Mar 2021 15:53:45 -0500 Subject: Improve empty reading handling (#1497) * Handle empty readings earlier in the definition creation process * Remove empty reading check * Remove special handling of empty readings --- ext/js/media/audio-downloader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/js/media') diff --git a/ext/js/media/audio-downloader.js b/ext/js/media/audio-downloader.js index bb8d40a8..68e03d39 100644 --- a/ext/js/media/audio-downloader.js +++ b/ext/js/media/audio-downloader.js @@ -131,7 +131,7 @@ class AudioDownloader { if (htmlReadings.length === 0) { continue; } const htmlReading = dom.getTextContent(htmlReadings[0]); - if (htmlReading && (!reading || reading === htmlReading)) { + if (htmlReading && (reading === expression || reading === htmlReading)) { url = this._normalizeUrl(url, response.url); return [{type: 'url', url}]; } -- cgit v1.2.3