Skip to content

Commit cc26496

Browse files
committed
Better support for helperClass
1 parent b4ca3b7 commit cc26496

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "reactgenie-lib",
3-
"version": "1.1.50",
3+
"version": "1.1.51",
44
"description": "A Toolkit for Multimodal Applications",
55
"author": "valkjsaaa",
66
"license": "Apache-2.0",

src/react-decorators.ts

+6
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@ export interface GenieInterfaceSpec extends GenieObjectSpec {
120120
}
121121

122122
export function InstantiateGenieObject(objectSpec: GenieObjectSpec): any {
123+
// check if localStore is a property of objectSpec
124+
if (Object.hasOwn(objectSpec, "localStore")) {
125+
if (objectSpec["localStore"]["__genieObjectClass"] == "HelperClass") {
126+
return objectSpec;
127+
}
128+
}
123129
const objectClass = AllGenieObjects[objectSpec.className] as typeof DataClass;
124130
return objectClass.GetObject(objectSpec.key);
125131
}

src/shared-store.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,7 @@ export function displayResult(
203203
let instantiatedDisplayingObject = null;
204204
if (displayingObject != null) {
205205
// if displayingObject is an array
206-
if (
207-
displayingObject instanceof Array &&
208-
displayingObject.length >= 1 &&
209-
displayingObject[0] instanceof DataClass
210-
) {
206+
if (displayingObject instanceof Array) {
211207
// always display
212208
onScreen = false;
213209
instantiatedDisplayingObject = [];

0 commit comments

Comments
 (0)