Skip to content

Commit 91d7b67

Browse files
authored
fix: location is not defined error in cleanScssBugUrl (#13100)
1 parent d95a9af commit 91d7b67

File tree

1 file changed

+1
-0
lines changed
  • packages/vite/src/node/plugins

1 file changed

+1
-0
lines changed

packages/vite/src/node/plugins/css.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1600,6 +1600,7 @@ function cleanScssBugUrl(url: string) {
16001600
if (
16011601
// check bug via `window` and `location` global
16021602
typeof window !== 'undefined' &&
1603+
typeof location !== 'undefined' &&
16031604
typeof location?.href === 'string'
16041605
) {
16051606
const prefix = location.href.replace(/\/$/, '')

0 commit comments

Comments
 (0)