From fd407a4f544070b2684dfcd564eed353a7709484 Mon Sep 17 00:00:00 2001 From: Stanimira Vlaeva Date: Wed, 15 Mar 2017 10:55:56 +0200 Subject: [PATCH] Cherry-pick: Fix utils/types class name resolution regex. (#3793) --- tns-core-modules/utils/types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tns-core-modules/utils/types.ts b/tns-core-modules/utils/types.ts index 84e0bacde..53ccc87d8 100644 --- a/tns-core-modules/utils/types.ts +++ b/tns-core-modules/utils/types.ts @@ -43,7 +43,7 @@ export function verifyCallback(value: any) { } var classInfosMap = new Map(); -var funcNameRegex = /function (.{1,})\(/; +var funcNameRegex = /function ([_a-zA-Z0-9]{1,})\(/; export function getClass(object: Object): string { return getClassInfo(object).name; } @@ -113,4 +113,4 @@ export class ClassInfo { export function toUIString(obj): string { return isNullOrUndefined(obj) ? "" : obj + ""; -} \ No newline at end of file +}