From 757e825be9b6b37332fa72b5c33fdadd964ce2be 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 53fa09d22..77694c7b4 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 + ) +);