Skip to content

Commit

Permalink
Merge branch 'release/4.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirk Lüth committed Jan 20, 2017
2 parents 62e85be + 587626d commit 4b4ca68
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 16 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qoopido.demand",
"version": "4.0.9",
"version": "4.1.0",
"homepage": "https://github.com/dlueth/qoopido.demand",
"authors": [
"Dirk Lueth <[email protected]>"
Expand Down
4 changes: 2 additions & 2 deletions dist/demand.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/demand.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/handler/css.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/handler/json.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/handler/legacy.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/handler/text.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/plugin/cookie.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/plugin/lzstring.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/plugin/sri.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "qoopido.demand",
"title": "Qoopido.demand",
"description": "Promise like module loader using XHR requests and localStorage caching to dynamically load JavaScript and CSS + dynamic dependency resolution + support for custom handlers",
"version": "4.0.9",
"version": "4.1.0",
"homepage": "https://github.com/dlueth/qoopido.demand",
"author": {
"name": "Dirk Lueth",
Expand Down
14 changes: 10 additions & 4 deletions src/function/demand.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,18 @@ global.demand = (function() {
function demand() {
var dependencies = arrayPrototypeSlice.call(arguments),
context = this !== global ? this : NULL,
i = 0, uri, result;

i = 0, uri, deferred, result;
singletonEvent.emit(EVENT_PRE_RESOLVE, NULL, dependencies, context);

for(; (uri = dependencies[i]); i++) {
dependencies[i] = ClassDependency.resolve(uri, context).pledge;
if(typeof uri === 'string') {
dependencies[i] = ClassDependency.resolve(uri, context).pledge;
} else {
dependencies[i] = (deferred = ClassPledge.defer()).pledge;

deferred.resolve(uri);
}
}

if(dependencies.length > 1) {
Expand Down

0 comments on commit 4b4ca68

Please sign in to comment.