Skip to content

Instantly share code, notes, and snippets.

@draeton
Created October 4, 2013 19:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save draeton/6831727 to your computer and use it in GitHub Desktop.
Save draeton/6831727 to your computer and use it in GitHub Desktop.
Rooting out little intractable, hair-pulling, teeth-clenching bugs caused by unforeseen variable overwrites
(function () {
var module;
Object.defineProperty(window, "module", {
get: function () {
return module;
},
set: function (val) {
debugger;
module = val;
}
});
var exports;
Object.defineProperty(window, "exports", {
get: function () {
return exports;
},
set: function (val) {
debugger;
exports = val;
}
});
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment