瀏覽代碼

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.
Brian Gough 11 年之前
父節點
當前提交
24b2844ece
共有 1 個文件被更改,包括 5 次插入 和 2 次删除
  1. 5 2
      services/web/public/coffee/utils/underscore.coffee

+ 5 - 2
services/web/public/coffee/utils/underscore.coffee

@@ -1,2 +1,5 @@
-angular.module('underscore', []).factory '_', ->
-	return window._
+define [
+	"libs"
+], () ->
+	angular.module('underscore', []).factory '_', ->
+		return window._