mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-26 23:04:32 +02:00
Use String.startsWith
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
var currentUrl = getOrigin()
|
||||
var liveUrl = 'https://v5.getbootstrap.com/'
|
||||
|
||||
hit.url = currentUrl.lastIndexOf(liveUrl, 0) === 0 ?
|
||||
hit.url = currentUrl.startsWith(liveUrl) ?
|
||||
// On production, return the result as is
|
||||
hit.url :
|
||||
// On development or Netlify, replace `hit.url` with a trailing slash,
|
||||
|
Reference in New Issue
Block a user