Skip to content

Commit

Permalink
Merge pull request richardtallent#8 from paintedbicycle/main
Browse files Browse the repository at this point in the history
Replace optional chaining with older syntax due to compatibility issue
  • Loading branch information
richardtallent authored Mar 21, 2021
2 parents e40baef + 3a1f2c6 commit 6ec8b96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function viteSingleFile(): Plugin {
enforce: "post",
transform(html: string, ctx?: IndexHtmlTransformContext): IndexHtmlTransformResult {
// Only use this plugin during build
if (!ctx?.bundle) return html
if (!ctx || !ctx.bundle) return html
// Get the bundle
let extraCode = ""
for (const [, value] of Object.entries(ctx.bundle)) {
Expand Down

0 comments on commit 6ec8b96

Please sign in to comment.