REST API: generate a valid fallback URI in wp.api.utils.getRootURL.
When window.location.origin isn't set, correctly insert two slashes between the protocol and host when constructing the fallback URL. props abdullahramzan. Fixes #44764. git-svn-id: https://develop.svn.wordpress.org/trunk@43566 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
244f435e22
commit
245fb8e9b0
@ -145,7 +145,7 @@
|
||||
wp.api.utils.getRootUrl = function() {
|
||||
return window.location.origin ?
|
||||
window.location.origin + '/' :
|
||||
window.location.protocol + '/' + window.location.host + '/';
|
||||
window.location.protocol + '//' + window.location.host + '/';
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user