From 38e1299ec4b53b4d8ab29ff5a9d2c4c126d6d950 Mon Sep 17 00:00:00 2001 From: ellenaua Date: Mon, 18 Jun 2018 07:38:42 +0300 Subject: [PATCH] prefer nodejs to amd declaration --- moment-timezone.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/moment-timezone.js b/moment-timezone.js index bb6bab44..3d93854d 100644 --- a/moment-timezone.js +++ b/moment-timezone.js @@ -8,11 +8,11 @@ "use strict"; /*global define*/ - if (typeof define === 'function' && define.amd) { - define(['moment'], factory); // AMD - } else if (typeof module === 'object' && module.exports) { + if (typeof module === 'object' && module.exports) { module.exports = factory(require('moment')); // Node - } else { + } else if (typeof define === 'function' && define.amd) { + define(['moment'], factory); // AMD + } else { factory(root.moment); // Browser } }(this, function (moment) {