Skip to content

Commit

Permalink
Core: Drop strundefined variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisAntaki authored and markelog committed Sep 2, 2014
1 parent 895ea68 commit 29838b6
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 20 deletions.
5 changes: 2 additions & 3 deletions src/attributes/attr.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
define([
"../core",
"../var/rnotwhite",
"../var/strundefined",
"../core/access",
"./support",
"../selector"
], function( jQuery, rnotwhite, strundefined, access, support ) {
], function( jQuery, rnotwhite, access, support ) {

var nodeHook, boolHook,
attrHandle = jQuery.expr.attrHandle;
Expand Down Expand Up @@ -33,7 +32,7 @@ jQuery.extend({
}

// Fallback to prop when attributes are not supported
if ( typeof elem.getAttribute === strundefined ) {
if ( !elem.getAttribute ) {
return jQuery.prop( elem, name, value );
}

Expand Down
5 changes: 2 additions & 3 deletions src/attributes/classes.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
define([
"../core",
"../var/rnotwhite",
"../var/strundefined",
"../data/var/dataPriv",
"../core/init"
], function( jQuery, rnotwhite, strundefined, dataPriv ) {
], function( jQuery, rnotwhite, dataPriv ) {

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

Expand Down Expand Up @@ -128,7 +127,7 @@ jQuery.fn.extend({
}

// Toggle whole class name
} else if ( type === strundefined || type === "boolean" ) {
} else if ( value === undefined || type === "boolean" ) {
if ( this.className ) {
// store className if set
dataPriv.set( this, "__className__", this.className );
Expand Down
2 changes: 1 addition & 1 deletion src/core/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ var rootjQuery,
// HANDLE: $(function)
// Shortcut for document ready
} else if ( jQuery.isFunction( selector ) ) {
return typeof rootjQuery.ready !== "undefined" ?
return rootjQuery.ready !== undefined ?
rootjQuery.ready( selector ) :
// Execute immediately if ready is not present
selector( jQuery );
Expand Down
5 changes: 2 additions & 3 deletions src/event.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
define([
"./core",
"./var/strundefined",
"./var/rnotwhite",
"./var/hasOwn",
"./var/slice",
Expand All @@ -10,7 +9,7 @@ define([
"./core/init",
"./data/accepts",
"./selector"
], function( jQuery, strundefined, rnotwhite, hasOwn, slice, support, dataPriv ) {
], function( jQuery, rnotwhite, hasOwn, slice, support, dataPriv ) {

var
rkeyEvent = /^key/,
Expand Down Expand Up @@ -72,7 +71,7 @@ jQuery.event = {
eventHandle = elemData.handle = function( e ) {
// Discard the second event of a jQuery.event.trigger() and
// when an event is called after a page has unloaded
return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ?
return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
jQuery.event.dispatch.apply( elem, arguments ) : undefined;
};
}
Expand Down
10 changes: 6 additions & 4 deletions src/exports/global.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
define([
"../core",
"../var/strundefined"
], function( jQuery, strundefined ) {
"../core"
], function( jQuery ) {

/* exported noGlobal */
/* global noGlobal: false */

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

Expand Down
5 changes: 2 additions & 3 deletions src/offset.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
define([
"./core",
"./var/strundefined",
"./core/access",
"./css/var/rnumnonpx",
"./css/curCSS",
Expand All @@ -10,7 +9,7 @@ define([
"./core/init",
"./css",
"./selector" // contains
], function( jQuery, strundefined, access, rnumnonpx, curCSS, addGetHookIf, support ) {
], function( jQuery, access, rnumnonpx, curCSS, addGetHookIf, support ) {

var docElem = window.document.documentElement;

Expand Down Expand Up @@ -99,7 +98,7 @@ jQuery.fn.extend({

// Support: BlackBerry 5, iOS 3 (original iPhone)
// If we don't have gBCR, just use 0,0 rather than error
if ( typeof elem.getBoundingClientRect !== strundefined ) {
if ( elem.getBoundingClientRect !== undefined ) {
box = elem.getBoundingClientRect();
}
win = getWindow( doc );
Expand Down
3 changes: 0 additions & 3 deletions src/var/strundefined.js

This file was deleted.

0 comments on commit 29838b6

Please sign in to comment.