Browse Source

only load libraries if present

Taylor Otwell 7 years ago
parent
commit
d905b2e7be
1 changed files with 4 additions and 2 deletions
  1. 4 2
      resources/assets/js/bootstrap.js

+ 4 - 2
resources/assets/js/bootstrap.js

@@ -7,9 +7,11 @@ window._ = require('lodash');
  * code may be modified to fit the specific needs of your application.
  */
 
-window.$ = window.jQuery = require('jquery');
+try {
+    window.$ = window.jQuery = require('jquery');
 
-require('bootstrap-sass');
+    require('bootstrap-sass');
+} catch (e) {}
 
 /**
  * We'll load the axios HTTP library which allows us to easily issue requests