Errors in fatal_error_handler
-
I think the fatal_error_handler code is incorrect.
This registers a global error handler, with
window.onerror = function.... The handler attempts to match the wording of the error, looking for deprecated jQuery functions.It uses
msg.match(), which returns either null or an array, but the code to check for results says:if ( typeof erroredFunction !== 'object' || typeof erroredFunction[1] === "undefined" || -1 === jQueryFunctions.indexOf( erroredFunction[1] ) )This doesn’t work when the result is null because
typeof null === "object"in JavaScript.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Errors in fatal_error_handler’ is closed to new replies.