Merge pull request #14890 from calixteman/14889
[JS] Formatted value has to be a string when neither null nor undefined
This commit is contained in:
commit
38c82357b2
@ -1532,6 +1532,8 @@ class WidgetAnnotation extends Annotation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert(typeof value === "string", "Expected `value` to be a string.");
|
||||||
|
|
||||||
value = value.trim();
|
value = value.trim();
|
||||||
|
|
||||||
if (value === "") {
|
if (value === "") {
|
||||||
|
@ -191,7 +191,7 @@ class EventDispatcher {
|
|||||||
let formattedValue = null;
|
let formattedValue = null;
|
||||||
|
|
||||||
if (this.runActions(source, source, event, "Format")) {
|
if (this.runActions(source, source, event, "Format")) {
|
||||||
formattedValue = event.value;
|
formattedValue = event.value?.toString?.();
|
||||||
}
|
}
|
||||||
|
|
||||||
source.obj._send({
|
source.obj._send({
|
||||||
@ -296,7 +296,7 @@ class EventDispatcher {
|
|||||||
savedValue = event.value = target.obj.value;
|
savedValue = event.value = target.obj.value;
|
||||||
let formattedValue = null;
|
let formattedValue = null;
|
||||||
if (this.runActions(target, target, event, "Format")) {
|
if (this.runActions(target, target, event, "Format")) {
|
||||||
formattedValue = event.value;
|
formattedValue = event.value?.toString?.();
|
||||||
}
|
}
|
||||||
|
|
||||||
target.obj._send({
|
target.obj._send({
|
||||||
|
Loading…
Reference in New Issue
Block a user