diff options
author | bobzel <zzzman@gmail.com> | 2023-03-05 21:24:09 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-03-05 21:24:09 -0500 |
commit | 0c38e4dc096d6abf82ef11286616856b7119c6e1 (patch) | |
tree | d61cb1b38a246a56905a0b24f6e81562b480934a /src/fields/util.ts | |
parent | a95043b3fd0325f79cae080bc71e8fe06432bdc3 (diff) |
replace jumpToDocument with showDocument. restructure code to get rid of scrollFocus by adding getView() and fixing focus() and restoreTargetView
Diffstat (limited to 'src/fields/util.ts')
-rw-r--r-- | src/fields/util.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fields/util.ts b/src/fields/util.ts index 6024705ec..e517e7604 100644 --- a/src/fields/util.ts +++ b/src/fields/util.ts @@ -335,8 +335,10 @@ export function setter(target: any, in_prop: string | symbol | number, value: an return true; } } - if (target.__fields[prop] instanceof ComputedField && target.__fields[prop].setterscript && value !== undefined && !(value instanceof ComputedField)) { - return ScriptCast(target.__fields[prop])?.setterscript?.run({ self: target[SelfProxy], this: target[SelfProxy], value }).success ? true : false; + if (target.__fields[prop] instanceof ComputedField) { + if (target.__fields[prop].setterscript && value !== undefined && !(value instanceof ComputedField)) { + return ScriptCast(target.__fields[prop])?.setterscript?.run({ self: target[SelfProxy], this: target[SelfProxy], value }).success ? true : false; + } } return _setter(target, prop, value, receiver); } |