javascript - Backbone Marionette AppRouter passing invalid arguments to function calls on Internet Explorer 8 (IE8) -


i've set backbone marionette application follows in application

cl.modules.users = (users, app, backbone, marionette, $, _) ->   users.router = class router extends cl.approuter     approutes:       'profile' : 'showprofile' 

and have function showprofile() takes argument.

showprofile: (arg1) ->   alert(arg1)   arg1.preventdefault() if arg1? 

in browsers other ie8, arg1 alerted undefined, on ie8, empty string (i checked using typeof). problem arg1? checks see if event undefined , preventdefault() being called on empty string on ie8, breaking execution. i'm not sure how happening. ideas?


Comments