compat: add missing polyfills for iOS that babel doesn't seem to provide anymore
This commit is contained in:
parent
2726b2dcce
commit
9a3e6513bf
3 changed files with 13 additions and 2 deletions
|
|
@ -63,7 +63,7 @@ module.exports = {
|
|||
|
||||
if (!nodes) nodes = context.querySelectorAll(selector)
|
||||
|
||||
return nodes.forEach ? nodes : [...nodes]
|
||||
return nodes
|
||||
|
||||
},
|
||||
|
||||
|
|
|
|||
11
src/client/app/polyfills.js
Normal file
11
src/client/app/polyfills.js
Normal 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
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
require('./app/stacktrace')
|
||||
|
||||
require('./app/polyfills')
|
||||
require('./app/globals')
|
||||
|
||||
var {loading} = require('./app/ui/utils'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue