aboutsummaryrefslogtreecommitdiff
path: root/ext/fg
diff options
context:
space:
mode:
authorAlex Yatskov <FooSoft@users.noreply.github.com>2019-09-05 19:46:14 -0700
committerGitHub <noreply@github.com>2019-09-05 19:46:14 -0700
commit6dc44e3f33d6f2ac2b5b7442879631a2943fcadc (patch)
treeeaac78e153efeb2a4496bd14f0c18a5d11d61d24 /ext/fg
parent9cd0101b62fe99d736b4e6b9072c2aa4827311af (diff)
parentb90dea0e6dd9e8321ca616f256d8d88fb3c599d1 (diff)
Merge pull request #202 from toasted-nutbread/temporary-object-optimization
Temporary object optimization
Diffstat (limited to 'ext/fg')
-rw-r--r--ext/fg/js/document.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/fg/js/document.js b/ext/fg/js/document.js
index bd876e5d..60b1b9bd 100644
--- a/ext/fg/js/document.js
+++ b/ext/fg/js/document.js
@@ -152,7 +152,7 @@ function docSentenceExtract(source, extent) {
if (quoteStack.length > 0 && c === quoteStack[0]) {
quoteStack.pop();
} else if (c in quotesBwd) {
- quoteStack = [quotesBwd[c]].concat(quoteStack);
+ quoteStack.unshift(quotesBwd[c]);
}
}
@@ -181,7 +181,7 @@ function docSentenceExtract(source, extent) {
if (quoteStack.length > 0 && c === quoteStack[0]) {
quoteStack.pop();
} else if (c in quotesFwd) {
- quoteStack = [quotesFwd[c]].concat(quoteStack);
+ quoteStack.unshift(quotesFwd[c]);
}
}