summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sotoudeh <matthewsot@outlook.com>2017-08-03 11:32:51 -0700
committerMatthew Sotoudeh <matthewsot@outlook.com>2017-08-03 11:32:51 -0700
commit2e07f9a4b122c029c3c5d67aee22fae047ddd82f (patch)
treefa41b0ac10f7174a4967dd9960d0565fdcbd537d
parentaea5d9bba2bb0764c46c215595f7db36c4563aad (diff)
fixed awaits in elsesHEADmaster
-rw-r--r--content/scripts/wrap-await.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/content/scripts/wrap-await.js b/content/scripts/wrap-await.js
index 38ab0f3..d23dd98 100644
--- a/content/scripts/wrap-await.js
+++ b/content/scripts/wrap-await.js
@@ -16,11 +16,12 @@ let esprima = require("esprima");
let escodegen = require("escodegen");
function wrapSingle(el) {
- if (el === undefined) return undefined;
+ if (el === undefined || el === null) return undefined;
el.argument = wrap(el.argument);
el.init = wrap(el.init);
el.consequent = wrap(el.consequent);
+ el.alternate = wrap(el.alternate);
el.arguments = wrap(el.arguments);
el.declarations = wrap(el.declarations);
@@ -39,7 +40,7 @@ function wrapSingle(el) {
return el;
}
function wrapList(list) {
- if (list === undefined) return undefined;
+ if (list === undefined || list === null) return undefined;
if (list.body !== undefined) {
list.body = wrap(list.body);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback