Skip to content

Commit 29838b6

Browse files
ChrisAntakimarkelog
authored andcommitted
Core: Drop strundefined variable
1 parent 895ea68 commit 29838b6

7 files changed

Lines changed: 15 additions & 20 deletions

File tree

src/attributes/attr.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
define([
22
"../core",
33
"../var/rnotwhite",
4-
"../var/strundefined",
54
"../core/access",
65
"./support",
76
"../selector"
8-
], function( jQuery, rnotwhite, strundefined, access, support ) {
7+
], function( jQuery, rnotwhite, access, support ) {
98

109
var nodeHook, boolHook,
1110
attrHandle = jQuery.expr.attrHandle;
@@ -33,7 +32,7 @@ jQuery.extend({
3332
}
3433

3534
// Fallback to prop when attributes are not supported
36-
if ( typeof elem.getAttribute === strundefined ) {
35+
if ( !elem.getAttribute ) {
3736
return jQuery.prop( elem, name, value );
3837
}
3938

src/attributes/classes.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
define([
22
"../core",
33
"../var/rnotwhite",
4-
"../var/strundefined",
54
"../data/var/dataPriv",
65
"../core/init"
7-
], function( jQuery, rnotwhite, strundefined, dataPriv ) {
6+
], function( jQuery, rnotwhite, dataPriv ) {
87

98
var rclass = /[\t\r\n\f]/g;
109

@@ -128,7 +127,7 @@ jQuery.fn.extend({
128127
}
129128

130129
// Toggle whole class name
131-
} else if ( type === strundefined || type === "boolean" ) {
130+
} else if ( value === undefined || type === "boolean" ) {
132131
if ( this.className ) {
133132
// store className if set
134133
dataPriv.set( this, "__className__", this.className );

src/core/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ var rootjQuery,
101101
// HANDLE: $(function)
102102
// Shortcut for document ready
103103
} else if ( jQuery.isFunction( selector ) ) {
104-
return typeof rootjQuery.ready !== "undefined" ?
104+
return rootjQuery.ready !== undefined ?
105105
rootjQuery.ready( selector ) :
106106
// Execute immediately if ready is not present
107107
selector( jQuery );

src/event.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
define([
22
"./core",
3-
"./var/strundefined",
43
"./var/rnotwhite",
54
"./var/hasOwn",
65
"./var/slice",
@@ -10,7 +9,7 @@ define([
109
"./core/init",
1110
"./data/accepts",
1211
"./selector"
13-
], function( jQuery, strundefined, rnotwhite, hasOwn, slice, support, dataPriv ) {
12+
], function( jQuery, rnotwhite, hasOwn, slice, support, dataPriv ) {
1413

1514
var
1615
rkeyEvent = /^key/,
@@ -72,7 +71,7 @@ jQuery.event = {
7271
eventHandle = elemData.handle = function( e ) {
7372
// Discard the second event of a jQuery.event.trigger() and
7473
// when an event is called after a page has unloaded
75-
return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ?
74+
return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
7675
jQuery.event.dispatch.apply( elem, arguments ) : undefined;
7776
};
7877
}

src/exports/global.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
define([
2-
"../core",
3-
"../var/strundefined"
4-
], function( jQuery, strundefined ) {
2+
"../core"
3+
], function( jQuery ) {
4+
5+
/* exported noGlobal */
6+
/* global noGlobal: false */
57

68
var
79
// Map over jQuery in case of overwrite
@@ -25,7 +27,7 @@ jQuery.noConflict = function( deep ) {
2527
// Expose jQuery and $ identifiers, even in AMD
2628
// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
2729
// and CommonJS for browser emulators (#13566)
28-
if ( typeof noGlobal === strundefined ) {
30+
if ( !noGlobal ) {
2931
window.jQuery = window.$ = jQuery;
3032
}
3133

src/offset.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
define([
22
"./core",
3-
"./var/strundefined",
43
"./core/access",
54
"./css/var/rnumnonpx",
65
"./css/curCSS",
@@ -10,7 +9,7 @@ define([
109
"./core/init",
1110
"./css",
1211
"./selector" // contains
13-
], function( jQuery, strundefined, access, rnumnonpx, curCSS, addGetHookIf, support ) {
12+
], function( jQuery, access, rnumnonpx, curCSS, addGetHookIf, support ) {
1413

1514
var docElem = window.document.documentElement;
1615

@@ -99,7 +98,7 @@ jQuery.fn.extend({
9998

10099
// Support: BlackBerry 5, iOS 3 (original iPhone)
101100
// If we don't have gBCR, just use 0,0 rather than error
102-
if ( typeof elem.getBoundingClientRect !== strundefined ) {
101+
if ( elem.getBoundingClientRect !== undefined ) {
103102
box = elem.getBoundingClientRect();
104103
}
105104
win = getWindow( doc );

src/var/strundefined.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)