Skip to content

Commit

Permalink
fix: location is not defined error in cleanScssBugUrl (#13100)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalKalita committed May 5, 2023
1 parent d95a9af commit 91d7b67
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/vite/src/node/plugins/css.ts
Expand Up @@ -1600,6 +1600,7 @@ function cleanScssBugUrl(url: string) {
if (
// check bug via `window` and `location` global
typeof window !== 'undefined' &&
typeof location !== 'undefined' &&
typeof location?.href === 'string'
) {
const prefix = location.href.replace(/\/$/, '')
Expand Down

0 comments on commit 91d7b67

Please sign in to comment.