-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Another flash of unstyled content #927
Another flash of unstyled content #927
Conversation
… ClientCssHelper key by removing the protocol from the key url.
} | ||
|
||
console.log('after modification: ', url); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a debug statement got left in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gah!
if (typeof url === 'string') { | ||
url = url | ||
.replace(/^http[s]?:/, '') | ||
.replace(new RegExp("^\/\/" + urlBase), ''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@@ -96,14 +96,18 @@ module.exports = { | |||
} | |||
|
|||
function normalizeLocalUrl(url) { | |||
const urlBase = location.protocol + "//" + location.host; | |||
const urlBase = location.host + (location.port ? ':' + location.port : ''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think host
should actually have the port included.
This fix builds on the work in #501 and handles the case where the below URLs are seen as different, thereby creating a flash of unstyled content: