this.onmove.bind() is undefined
lookfirst opened this issue · 6 comments
seeing this error on some devices (blackberry and sometimes mobile safari 4 and 5)...
TypeError: Result of expression 'this.onmove.bind' [undefined] is not a function.
can we just check to make sure it is defined?
I think it is undefined because Function.prototype.bind
is not supported in ios safari < 6.0.
I didn't planned to support browsers without ECMAScript 5 support
Interesting... that explains a lot... no worries... I just have no control over who visits my site so I try to support them the best that I can...
I just changed the code to this:
if (this.onmove && this.onmove.bind) {
this.onmove = this.onmove.bind(this);
this.onend = this.hide.bind(this);
this.bind();
}
You can use bind polyfill or ES5 shim
@andrepolischuk Good point, but the errors seem to be on devices where I just disable the magnifier anyway... =)
Can I close this?