mirror of https://github.com/twbs/bootstrap.git
				
				
				
			Merge pull request #13842 from twbs/fix-13811
update "is jQuery defined" check for UMD compatibility
This commit is contained in:
		
						commit
						1c42dfcd53
					
				|  | @ -33,7 +33,7 @@ module.exports = function (grunt) { | |||
|             ' * Licensed under <%= pkg.license.type %> (<%= pkg.license.url %>)\n' + | ||||
|             ' */\n', | ||||
|     // NOTE: This jqueryCheck code is duplicated in customizer.js; if making changes here, be sure to update the other copy too.
 | ||||
|     jqueryCheck: 'if (typeof jQuery === \'undefined\') { throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery\') }\n\n', | ||||
|     jqueryCheck: 'if (typeof define == \'undefined\' && typeof exports == \'undefined\' && typeof jQuery == \'undefined\') { throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery\') }\n\n', | ||||
| 
 | ||||
|     // Task configuration.
 | ||||
|     clean: { | ||||
|  |  | |||
|  | @ -4,7 +4,7 @@ | |||
|  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 | ||||
|  */ | ||||
| 
 | ||||
| if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') } | ||||
| if (typeof define == 'undefined' && typeof exports == 'undefined' && typeof jQuery == 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') } | ||||
| 
 | ||||
| /* ======================================================================== | ||||
|  * Bootstrap: transition.js v3.1.1 | ||||
|  |  | |||
|  | @ -306,7 +306,7 @@ window.onload = function () { // wait for load in a dumb way because B-0 | |||
| 
 | ||||
|   function generateJS(preamble) { | ||||
|     var $checked = $('#plugin-section input:checked') | ||||
|     var jqueryCheck = 'if (typeof jQuery === "undefined") { throw new Error("Bootstrap\'s JavaScript requires jQuery") }\n\n' | ||||
|     var jqueryCheck = 'if (typeof define == \'undefined\' && typeof exports == \'undefined\' && typeof jQuery == \'undefined\') { throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery\') }\n\n' | ||||
| 
 | ||||
|     if (!$checked.length) return false | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue