Saturday 15 January 2011

javascript - syntax error on safari after bundling code -



javascript - syntax error on safari after bundling code -

hi have javascript function that's throwing syntax error on safari code works in other browsers (chrome, ff). receiving error after inbuild minification process bundling of .net.

error: syntaxerror: unexpected token 'function'

before bundling :

function btnstatus($btn, $status) { if ($status) { $btn.prop('disabled', false); } else { $btn.attr('disabled', true); } homecoming false; }

after bundling :

function btnstatus(n, t) { homecoming t ? n.prop("disabled", !1) : n.attr("disabled", !0), !1}

can show me insight of error!

actual problem not due btnstatus function. it's because of minification process of asp.net on bundling. when disabled minification process works. don't understand why safari producing error not other browsers.

fortunately disabling minification on bundling explain in stack overflow here @rudi visser answer.

javascript jquery .net safari asp.net-bundling

No comments:

Post a Comment