From 24b2844ecef9c310c960e8021a787f0924a7957d Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Fri, 6 Mar 2015 15:03:30 +0000 Subject: [PATCH] avoid race condition loading underscore make underscore.coffee angular module depend on libs, which depends on underscore-1.3.3 Have avoided adding an extra dependency on underscore itself so that the version number is not duplicated. We could have a single definition of underscore in the requirejs config, to keep the version number in one place. --- services/web/public/coffee/utils/underscore.coffee | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/services/web/public/coffee/utils/underscore.coffee b/services/web/public/coffee/utils/underscore.coffee index 80d18d15c2..7a1551f90b 100644 --- a/services/web/public/coffee/utils/underscore.coffee +++ b/services/web/public/coffee/utils/underscore.coffee @@ -1,2 +1,5 @@ -angular.module('underscore', []).factory '_', -> - return window._ \ No newline at end of file +define [ + "libs" +], () -> + angular.module('underscore', []).factory '_', -> + return window._