Skip to content

Commit 3b4f18d

Browse files
committed
Saves space by testing for the absence of the letter 'i' in the readyState.
1 parent e0ade2e commit 3b4f18d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jquery.jsonp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@
223223
script[ STR_ON_LOAD ] = script[ STR_ON_ERROR ] = script[ STR_ON_READY_STATE_CHANGE ] = function ( result ) {
224224

225225
// Test readyState if it exists
226-
if ( !script[ STR_READY_STATE ] || /loaded|complete/.test( script[ STR_READY_STATE ] ) ) {
226+
if ( !script[ STR_READY_STATE ] || !/i/.test( script[ STR_READY_STATE ] ) ) {
227227

228228
try {
229229

0 commit comments

Comments
 (0)