mirror of
https://github.com/correl/melpa.git
synced 2024-12-23 19:19:51 +00:00
Use latest mithril, and remove local patch
This commit is contained in:
parent
d447dda941
commit
39b16d0df0
2 changed files with 1 additions and 26 deletions
|
@ -43,7 +43,7 @@
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/es5-shim/2.3.0/es5-shim.min.js"></script>
|
<script src="//cdnjs.cloudflare.com/ajax/libs/es5-shim/2.3.0/es5-shim.min.js"></script>
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/json2/20130526/json2.min.js"></script>
|
<script src="//cdnjs.cloudflare.com/ajax/libs/json2/20130526/json2.min.js"></script>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/mithril/0.1.14/mithril.min.js"></script>
|
<script src="//cdnjs.cloudflare.com/ajax/libs/mithril/0.1.15/mithril.min.js"></script>
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.0.0/moment.min.js"></script>
|
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.0.0/moment.min.js"></script>
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/1.3.1/lodash.min.js"></script>
|
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/1.3.1/lodash.min.js"></script>
|
||||||
<script src="js/melpa.js"></script>
|
<script src="js/melpa.js"></script>
|
||||||
|
|
|
@ -11,31 +11,6 @@
|
||||||
// TODO Show recent github events on package pages where applicable
|
// TODO Show recent github events on package pages where applicable
|
||||||
// TODO Voting / starring
|
// TODO Voting / starring
|
||||||
|
|
||||||
// Temporary fix pending https://github.com/lhorie/mithril.js/issues/101 upstream
|
|
||||||
m.sync = function(args) {
|
|
||||||
var method = "resolve"
|
|
||||||
function synchronizer(pos, resolved) {
|
|
||||||
return function(value) {
|
|
||||||
results[pos] = value
|
|
||||||
if (!resolved) method = "reject"
|
|
||||||
if (--outstanding == 0) {
|
|
||||||
deferred.promise(results)
|
|
||||||
deferred[method](results)
|
|
||||||
}
|
|
||||||
return value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var deferred = m.deferred()
|
|
||||||
var outstanding = args.length
|
|
||||||
var results = new Array(outstanding)
|
|
||||||
for (var i = 0; i < args.length; i++) {
|
|
||||||
args[i].then(synchronizer(i, true), synchronizer(i, false))
|
|
||||||
}
|
|
||||||
return deferred.promise
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
// Helpers
|
// Helpers
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Reference in a new issue