-
-
Save mdobson/55f02ffca13c98eb5569 to your computer and use it in GitHub Desktop.
Sample url parse fix
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
var serverPath = '/servers/' + server.id; | |
if(url.indexOf('/', url.length - 1)!== -1) { | |
url = url + serverPath; | |
} else { | |
url = url.slice(0, url.length - 1) + serverPath; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment