Skip to content

Commit

Permalink
Better support for helperClass
Browse files Browse the repository at this point in the history
  • Loading branch information
valkjsaaa committed May 14, 2024
1 parent b4ca3b7 commit cc26496
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reactgenie-lib",
"version": "1.1.50",
"version": "1.1.51",
"description": "A Toolkit for Multimodal Applications",
"author": "valkjsaaa",
"license": "Apache-2.0",
Expand Down
6 changes: 6 additions & 0 deletions src/react-decorators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ export interface GenieInterfaceSpec extends GenieObjectSpec {
}

export function InstantiateGenieObject(objectSpec: GenieObjectSpec): any {
// check if localStore is a property of objectSpec
if (Object.hasOwn(objectSpec, "localStore")) {
if (objectSpec["localStore"]["__genieObjectClass"] == "HelperClass") {
return objectSpec;
}
}
const objectClass = AllGenieObjects[objectSpec.className] as typeof DataClass;
return objectClass.GetObject(objectSpec.key);
}
Expand Down
6 changes: 1 addition & 5 deletions src/shared-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,7 @@ export function displayResult(
let instantiatedDisplayingObject = null;
if (displayingObject != null) {
// if displayingObject is an array
if (
displayingObject instanceof Array &&
displayingObject.length >= 1 &&
displayingObject[0] instanceof DataClass
) {
if (displayingObject instanceof Array) {
// always display
onScreen = false;
instantiatedDisplayingObject = [];
Expand Down

0 comments on commit cc26496

Please sign in to comment.