Skip to content

Commit

Permalink
Merge pull request #2 from hilkeheremans/fix/is_class_minified_builds
Browse files Browse the repository at this point in the history
fix(estdlib): isClass does not always recognize minified classes
  • Loading branch information
marcj authored Jun 22, 2020
2 parents d950d1c + 01e25c7 commit 958804b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/estdlib/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export function isPromise(obj: any): obj is Promise<any> {
*/
export function isClass(obj: any): obj is ClassType<any> {
if ('function' === typeof obj) {
return obj.toString().startsWith('class ');
return obj.toString().startsWith('class ') || obj.toString().startsWith('class{');
}

return false;
Expand Down

0 comments on commit 958804b

Please sign in to comment.