diff --git a/lib/common/utils.ts b/lib/common/utils.ts index dc1c3e91a..0a7c898e2 100644 --- a/lib/common/utils.ts +++ b/lib/common/utils.ts @@ -106,6 +106,9 @@ export function patchProperty(obj: any, prop: string) { // The getter would return undefined for unassigned properties but the default value of an // unassigned property is null desc.get = function() { + if (this == null) { + return this; + } let r = this[_prop] || null; // result will be null when use inline event attribute, // such as