Skip to content

Commit

Permalink
fix: an empty string is inserted in the cache don't need to throw an …
Browse files Browse the repository at this point in the history
…error
  • Loading branch information
poyoho committed Dec 12, 2021
1 parent 4f7ee7e commit dba0c69
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/vite/src/node/plugins/html.ts
Expand Up @@ -58,11 +58,7 @@ export function htmlInlineScriptProxyPlugin(config: ResolvedConfig): Plugin {
const file = cleanUrl(id)
const url = file.replace(normalizePath(config.root), '')
const result = htmlProxyMap.get(config)!.get(url)![index]
if (typeof result === 'string') {
return result
} else {
throw new Error(`No matching HTML proxy module found from ${id}`)
}
return result
}
}
}
Expand Down

0 comments on commit dba0c69

Please sign in to comment.