Skip to content

Commit d024dcc

Browse files
iMythktsn
authored andcommitted
fix: browser compatibility issues (#319)
* fix: browser compatibility issues * style: removed the quotes * fix: updated comment
1 parent 2219125 commit d024dcc

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/component.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,22 @@ const reservedPropertyNames = [
109109
'filter'
110110
]
111111

112+
const shouldIgnore = {
113+
prototype: true,
114+
arguments: true,
115+
callee: true,
116+
caller: true
117+
}
118+
112119
function forwardStaticMembers (
113120
Extended: typeof Vue,
114121
Original: typeof Vue,
115122
Super: typeof Vue
116123
): void {
117124
// We have to use getOwnPropertyNames since Babel registers methods as non-enumerable
118125
Object.getOwnPropertyNames(Original).forEach(key => {
119-
// `prototype` should not be overwritten
120-
if (key === 'prototype') {
126+
// Skip the properties that should not be overwritten
127+
if (shouldIgnore[key]) {
121128
return
122129
}
123130

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy