Skip to content

Commit 45dc9ba

Browse files
committed
hasOwnProperty
1 parent 1df772d commit 45dc9ba

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ async function generateBundle(bundle: OutputBundle, config: ResolvedConfig, opti
7171

7272
// rename
7373
if (options.rename
74-
&& options.rename !== "index.html"
75-
&& ("index.html" in bundle)
76-
&& !(options.rename in bundle)
74+
&& options.rename != "index.html"
75+
&& Object.prototype.hasOwnProperty.call(bundle, "index.html")
76+
&& !Object.prototype.hasOwnProperty.call(bundle, options.rename)
7777
) {
7878
bundle[options.rename] = bundle["index.html"]
7979
bundle[options.rename].fileName = options.rename

0 commit comments

Comments
 (0)