Reputation:
Object doesn't support this
property or method
" in ie8region.getWorld();
allWidth: function() {
var me = this,
states = me.getstates(),
waterY = 0,
placeY = 0,
World;
states.forEach(function(region) {
World = region.getWorld();
if (World.y < placeY) {
placeY = World.y;
}
if (World.y + World.height > waterY) {
waterY = World.y + World.height;
}
});
return waterY - placeY;
},
Upvotes: 0
Views: 88
Reputation: 4251
IE8 doesn't support the forEach
method for Arrays. You have a few options to fix this.
You could use a normal for loop:
for(var i = 0; i < states.length; i++){
var region = states[i];
/* ... */
Since you're using extjs, you could also use the Ext.each
method instead:
Ext.each(states, function(region){
...
Or you could use a shim/polyfill to add the forEach
method in IE8.
You can find a polyfill for the forEach
method on MDN here.
Upvotes: 1