Skip to content

Commit

Permalink
Merge pull request #9 from BlueHuskyStudios/feature/4-Include-jQuery
Browse files Browse the repository at this point in the history
Using typeof to check if JQuery is there
  • Loading branch information
KyNorthstar authored May 13, 2021
2 parents 220f4ef + 290ba7a commit 6924f28
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion assets/v2/general/js/BHStudios General Scripts.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/v2/general/js/BHStudios General Scripts.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/v2/general/kt/src/org/bh/scripts/general/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private object Setup {


fun downloadJQuery() {
if (js("jQuery") === undefined) {
if (js("typeof(jQuery)") === "undefined") {
val script = document.createElement("script") as? HTMLScriptElement ?: return console.error("Could not create script element")
script.src = "//code.jquery.com/jquery-3.x-git.slim.min.js"
script.type = "text/javascript"
Expand Down

0 comments on commit 6924f28

Please sign in to comment.