Created
May 14, 2012 16:55
-
-
Save basketofsoftkittens/2695044 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<<<<<<< HEAD | |
// recurse through dependencies object | |
// to count total number objects | |
loading = _.reduce(deps, function(total, val) { | |
var count = | |
_.isFunction(val) ? 1 : | |
_.isArray(val) ? val.length : | |
_.isObject(val) ? _.keys(val).length : 0; | |
return count + total; | |
}, 0); | |
// return if no dependencies | |
if(_.isEmpty(deps) || loading === 0) { return resourcesLoaded(); } | |
======= | |
// no dependencies | |
if(_.isEmpty(deps)) { return resourcesLoaded(); } | |
// recurse through dependencies object | |
// to count total number objects | |
loading = _.reduce(deps, function(total, val) { | |
var count = | |
_.isFunction(val) ? 1 : | |
_.isArray(val) ? val.length : | |
_.isObject(val) ? _.keys(val).length : 0; | |
return count + total; | |
}, 0); | |
>>>>>>> master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment