Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit 8203f0a

Browse files
committed
Merge pull request #142 from jankeesvw/master
Updated Almond to 0.2.5 and Require to 2.1.8.
2 parents 6fb1ad1 + 3d2b151 commit 8203f0a

File tree

3 files changed

+136
-67
lines changed

3 files changed

+136
-67
lines changed

lib/requirejs/rails/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Requirejs
22
module Rails
33
Version = "0.9.1"
4-
LibVersion = "2.1.2"
4+
LibVersion = "2.1.8"
55
end
66
end

vendor/assets/javascripts/almond.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* almond 0.2.3 Copyright (c) 2011-2012, The Dojo Foundation All Rights Reserved.
2+
* almond 0.2.5 Copyright (c) 2011-2012, The Dojo Foundation All Rights Reserved.
33
* Available via the MIT or new BSD license.
44
* see: http://github.com/jrburke/almond for details
55
*/
@@ -357,9 +357,15 @@ var requirejs, require, define;
357357
if (forceSync) {
358358
main(undef, deps, callback, relName);
359359
} else {
360+
//Using a non-zero value because of concern for what old browsers
361+
//do, and latest browsers "upgrade" to 4 if lower value is used:
362+
//http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
363+
//If want a value immediately, use require('id') instead -- something
364+
//that works in almond on the global level, but not guaranteed and
365+
//unlikely to work in other AMD implementations.
360366
setTimeout(function () {
361367
main(undef, deps, callback, relName);
362-
}, 15);
368+
}, 4);
363369
}
364370

365371
return req;
@@ -371,6 +377,9 @@ var requirejs, require, define;
371377
*/
372378
req.config = function (cfg) {
373379
config = cfg;
380+
if (config.deps) {
381+
req(config.deps, config.callback);
382+
}
374383
return req;
375384
};
376385

@@ -393,4 +402,4 @@ var requirejs, require, define;
393402
define.amd = {
394403
jQuery: true
395404
};
396-
}());
405+
}());

0 commit comments

Comments
 (0)