tcoulter / jockeyjs

Library to facilitate communication between iOS apps and JS apps running inside a UIWebView
MIT License
458 stars 99 forks source link

Undefined callback #34

Open joaomilho opened 8 years ago

joaomilho commented 8 years ago

I've searched the issues and couldn't find one, so...

I keep getting a TypeError: undefined is not a function (evaluating 'this.callbacks[t]()') from my minified Jockey file (triggerCallback:function(t){this.callbacks[t]()}). I suppose it relates to this, where for some reason id is undefined and/or points to a callback that doesn't exist:

        triggerCallback: function(id) {
            this.callbacks[id]();
        },

It happens on iOS (the user agent I got from Aibrake is Safari 12H321).

Did you have any error like this? Also, since I'm not much into Jockey code base, would it be ok to just wrap it into a try/catch?

Thanks!