diff --git a/index.js b/index.js index 1b9bc0d..7c42861 100644 --- a/index.js +++ b/index.js @@ -175,7 +175,8 @@ ajax.JSONP = function(options){ clearTimeout(abortTimeout) //todo: remove script //$(script).remove() - delete window[callbackName] + //delete window[callbackName] + if (callbackName in window) window[callbackName] = empty ajaxSuccess(data, xhr, options) }