From 9fdcc00739011b2e38ea3749c6b99c0a4e032aed Mon Sep 17 00:00:00 2001 From: Jason Hunter Date: Sun, 14 Aug 2016 22:39:50 -0400 Subject: [PATCH] flip module.exports and window check for this lib to work on nw.js and electron per Issue #13 --- src/s2geometry.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/s2geometry.js b/src/s2geometry.js index b13b09d..470f3d7 100644 --- a/src/s2geometry.js +++ b/src/s2geometry.js @@ -484,7 +484,7 @@ S2.S2Cell.nextKey = S2.nextKey = function (key) { return S2.stepKey(key, 1); }; -})('undefined' !== typeof window ? window : module.exports); +})('undefined' !== typeof module.exports ? module.exports : window); (function (exports) { 'use strict'; @@ -517,4 +517,4 @@ S2.S2Cell.nextKey = S2.nextKey = function (key) { L.LatLng.DEG_TO_RAD = Math.PI / 180; L.LatLng.RAD_TO_DEG = 180 / Math.PI; -})('undefined' !== typeof window ? window : module.exports); +})('undefined' !== typeof module.exports ? module.exports : window);