summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2019-08-15 15:35:23 +0300
committersiikamiika <siikamiika@users.noreply.github.com>2019-08-15 15:35:23 +0300
commit609dbf6a819a736818e9caa03893850f14453d84 (patch)
treeca7c23244adedc79d299fbdb4c7654a75f3e91f4
parent0a9b673e27de04c499e06680d36e804a6a43f673 (diff)
ensure that content is iterable
-rw-r--r--ext/fg/js/source.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/fg/js/source.js b/ext/fg/js/source.js
index cbf0ce7d..bbf00e30 100644
--- a/ext/fg/js/source.js
+++ b/ext/fg/js/source.js
@@ -240,7 +240,7 @@ class TextSourceElement {
let consumed = 0;
let content = '';
- for (let currentChar of this.content) {
+ for (let currentChar of this.content || '') {
if (consumed >= length) {
break;
} else if (!currentChar.match(IGNORE_TEXT_PATTERN)) {