mirror of https://github.com/twbs/bootstrap.git
				
				
				
			Add the jquery check in customizer's output.
This commit is contained in:
		
							parent
							
								
									3f90763995
								
							
						
					
					
						commit
						7950c0ff0a
					
				| 
						 | 
				
			
			@ -295,6 +295,8 @@ 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'
 | 
			
		||||
 | 
			
		||||
    if (!$checked.length) return false
 | 
			
		||||
 | 
			
		||||
    var js = $checked
 | 
			
		||||
| 
						 | 
				
			
			@ -302,6 +304,8 @@ window.onload = function () { // wait for load in a dumb way because B-0
 | 
			
		|||
      .toArray()
 | 
			
		||||
      .join('\n')
 | 
			
		||||
 | 
			
		||||
    js = jqueryCheck + js
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
      'bootstrap.js': preamble + js,
 | 
			
		||||
      'bootstrap.min.js': preamble + cw + uglify(js)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue