Skip to content

Commit fd407a4

Browse files
authored
Cherry-pick: Fix utils/types class name resolution regex. (#3793)
1 parent cbbb5c1 commit fd407a4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎tns-core-modules/utils/types.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function verifyCallback(value: any) {
4343
}
4444

4545
var classInfosMap = new Map<Function, ClassInfo>();
46-
var funcNameRegex = /function (.{1,})\(/;
46+
var funcNameRegex = /function ([_a-zA-Z0-9]{1,})\(/;
4747
export function getClass(object: Object): string {
4848
return getClassInfo(object).name;
4949
}
@@ -113,4 +113,4 @@ export class ClassInfo {
113113

114114
export function toUIString(obj): string {
115115
return isNullOrUndefined(obj) ? "" : obj + "";
116-
}
116+
}

0 commit comments

Comments
 (0)