Created
May 21, 2019 22:53
-
-
Save stevekrouse/d0e0443f2269933ac4e0fe7321876a78 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (error.url === "") { | |
| var emptyURLTypes = ["setBackdropURL('')", 'setBackdropURL("")', 'url: ""', "url: ''"] | |
| var emptyURLType = emptyURLTypes.find(t => code.includes(t)) | |
| if (emptyURLType) { | |
| app.error = {message: "You forgot to include an image or background URL.", lineno: code.substring(0, code.indexOf(emptyURLType)).split('\n').length} | |
| } else { | |
| // We can't figure out the lineno if it's set to an empty string variable | |
| // https://woofjs.com/create#image-url-issue | |
| app.error = {message: "You forgot to include an image or background URL.", lineno: null} | |
| } | |
| } else { | |
| app.error = {message: "Your image URL (" + error.url +") is misspelled or not correct.", lineno: code.substring(0, code.indexOf(error.url)).split('\n').length} | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment