From e6998948b149adf1b1cc80dd2559f9cd6c3b96af Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Mon, 8 Apr 2013 10:49:39 -0400 Subject: [PATCH] Compatibility with browserify In a browserify package, `this` will refer to a node-style exports object, not window. So just reference `window` directly. --- build/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/build.js b/build/build.js index b207a38b..3fa55c8c 100644 --- a/build/build.js +++ b/build/build.js @@ -117,7 +117,7 @@ exports.build = function (compsBase32, buildName) { var copy = fs.readFileSync('src/copyright.js', 'utf8'), intro = '(function (window, document, undefined) {', - outro = '}(this, document));', + outro = '}(window, document));', newSrc = copy + intro + combineFiles(files) + outro, pathPart = 'dist/leaflet' + (buildName ? '-' + buildName : ''),