Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 <button onclick="func();">OK</button>
Expand Down