bugfix / testing: Ie11 warning for not having Promises (#4167)
Makes IE11 work again but may cause an issue for plugin testing in IE11. IE plugin tests in IE11 will probably fail as the plugin code will not execute.pull/4172/head
parent
e24ef6969e
commit
9bf1b9f2a2
|
@ -96,11 +96,16 @@ function aCallAll(hook_name, args, cb) {
|
||||||
/* return a Promise if cb is not supplied */
|
/* return a Promise if cb is not supplied */
|
||||||
exports.aCallAll = function (hook_name, args, cb) {
|
exports.aCallAll = function (hook_name, args, cb) {
|
||||||
if (cb === undefined) {
|
if (cb === undefined) {
|
||||||
return new Promise(function(resolve, reject) {
|
try{
|
||||||
aCallAll(hook_name, args, function(err, res) {
|
return new Promise(function(resolve, reject) {
|
||||||
return err ? reject(err) : resolve(res);
|
aCallAll(hook_name, args, function(err, res) {
|
||||||
|
return err ? reject(err) : resolve(res);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
}catch(e){
|
||||||
|
$.gritter.removeAll();
|
||||||
|
$.gritter.add("Please update your web browser")
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return aCallAll(hook_name, args, cb);
|
return aCallAll(hook_name, args, cb);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue