From fe0ff9d842bc3bbf6090f7bf96ea4eaeda5a1efa Mon Sep 17 00:00:00 2001 From: Tim Wood Date: Tue, 12 May 2015 09:09:19 -0500 Subject: [PATCH] Log an error if moment timezone was already loaded. #212 --- moment-timezone.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/moment-timezone.js b/moment-timezone.js index 75271bbd..e0d03d5a 100644 --- a/moment-timezone.js +++ b/moment-timezone.js @@ -19,7 +19,10 @@ "use strict"; // Do not load moment-timezone a second time. - if (moment.tz !== undefined) { return moment; } + if (moment.tz !== undefined) { + logError('Moment Timezone ' + moment.tz.version + ' was already loaded ' + (moment.tz.dataVersion ? 'with data from ' : 'without any data') + moment.tz.dataVersion); + return moment; + } var VERSION = "0.3.1", zones = {},