compat: add missing polyfills for iOS that babel doesn't seem to provide anymore

This commit is contained in:
jean-emmanuel 2018-11-06 20:09:46 +01:00
parent 2726b2dcce
commit 9a3e6513bf
3 changed files with 13 additions and 2 deletions

View file

@ -63,7 +63,7 @@ module.exports = {
if (!nodes) nodes = context.querySelectorAll(selector)
return nodes.forEach ? nodes : [...nodes]
return nodes
},

View file

@ -0,0 +1,11 @@
if (!Object.values) {
Object.values = function(e){
return Array.prototype.map.call(Object.keys(e), function(t,r){return e[t]})
}
}
if (!NodeList.prototype.forEach) {
NodeList.prototype.forEach = Array.prototype.forEach
}

View file

@ -1,5 +1,5 @@
require('./app/stacktrace')
require('./app/polyfills')
require('./app/globals')
var {loading} = require('./app/ui/utils'),