From b823b6ebcae40994745d24c38d46fc6280d8e820 Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Fri, 20 Jul 2018 12:55:58 -0500 Subject: [PATCH] mainContext -- fallback to `this`, then `self`, then `undefined` --- lib/contracts/code_templates/main-context.js.ejs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/contracts/code_templates/main-context.js.ejs b/lib/contracts/code_templates/main-context.js.ejs index 53fa09d2..77694c7b 100644 --- a/lib/contracts/code_templates/main-context.js.ejs +++ b/lib/contracts/code_templates/main-context.js.ejs @@ -1 +1,5 @@ -var __mainContext = __mainContext || (typeof self !== 'undefined' ? self : this); +var __mainContext = __mainContext || ( + typeof this !== 'undefined' ? this : ( + typeof self !== 'undefined' ? self : void 0 + ) +);