Skip to content

Commit

Permalink
fix: browser compatibility issues (#319)
Browse files Browse the repository at this point in the history
* fix: browser compatibility issues

* style: removed the quotes

* fix: updated comment
  • Loading branch information
iMyth authored and ktsn committed Mar 25, 2019
1 parent 2219125 commit d024dcc
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/component.ts
Expand Up @@ -109,15 +109,22 @@ const reservedPropertyNames = [
'filter'
]

const shouldIgnore = {
prototype: true,
arguments: true,
callee: true,
caller: true
}

function forwardStaticMembers (
Extended: typeof Vue,
Original: typeof Vue,
Super: typeof Vue
): void {
// We have to use getOwnPropertyNames since Babel registers methods as non-enumerable
Object.getOwnPropertyNames(Original).forEach(key => {
// `prototype` should not be overwritten
if (key === 'prototype') {
// Skip the properties that should not be overwritten
if (shouldIgnore[key]) {
return
}

Expand Down

0 comments on commit d024dcc

Please sign in to comment.