Commit 7950c0ff authored by XhmikosR's avatar XhmikosR
Browse files

Add the jquery check in customizer's output.

parent 3f907639
Showing with 4 additions and 0 deletions
+4 -0
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment