This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(annotations): isClass annotation to leverage methods to be future…
… compliant
- Loading branch information
1 parent
93efb35
commit 72c7ca0
Showing
1 changed file
with
2 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,8 @@ function isClass(clsOrFunction) { | |
else if (clsOrFunction.name) { | ||
return isUpperCase(clsOrFunction.name.charAt(0)); | ||
} else { | ||
return Object.keys(clsOrFunction.prototype).length > 0; | ||
var hasSymbol = Object.getOwnPropertySymbols && Object.getOwnPropertySymbols(clsOrFunction.prototype).length > 0; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
caitp
Contributor
|
||
return Object.getOwnPropertyNames(clsOrFunction.prototype).length > 0 || hasSymbol; | ||
} | ||
} | ||
|
||
|
@caitp Does this properly address your concern?