From d85db291d0071e71f6663331b757ce8dcbf00035 Mon Sep 17 00:00:00 2001 From: zepumph Date: Mon, 28 Mar 2022 18:50:06 -0600 Subject: [PATCH] check state is valid based on parameterType that serialized it, Utterance.toStateObject to use IOType to serialize, https://github.com/phetsims/center-and-variability/issues/113 https://github.com/phetsims/tambo/issues/160 --- js/Utterance.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/Utterance.ts b/js/Utterance.ts index fc0b616..bad0672 100644 --- a/js/Utterance.ts +++ b/js/Utterance.ts @@ -189,7 +189,7 @@ class Utterance { */ toStateObject(): SerializedUtterance { return { - alert: this.getAlertText() + alert: NullableIO( OrIO( [ StringIO, NumberIO ] ) ).toStateObject( this.getAlertText() ) }; }