Skip to content

Commit

Permalink
removed unused type property from the local evaluated expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan committed May 3, 2023
1 parent c101fb3 commit 71eb442
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion shesha-reactjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shesha/reactjs",
"version": "4.0.149-canary",
"version": "4.0.150-canary",
"description": "The reactjs frontend application and ui for the shesha framework",
"license": "GPL-3.0",
"homepage": "https://shesha-io.github.io/shesha-framework",
Expand Down
4 changes: 2 additions & 2 deletions shesha-reactjs/src/components/queryBuilder/funcs/evaluate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { IEvaluateNode, IEvaluateNodeArgs } from 'utils/jsonLogic';
const args2JsonLogic: JsonLogicFormatFunc = (funcArgs: TypedMap<JsonLogicValue>): JsonLogicTree => {
const node: IEvaluateNode = {
evaluate: [
{ expression: funcArgs.expression, type: 'string' }
{ expression: funcArgs.expression }
]
};

Expand All @@ -18,7 +18,7 @@ const jsonLogic2Args: JsonLogicImportFunc = (val): RuleValue[] => {

const args: IEvaluateNodeArgs = Array.isArray(typedNode.evaluate) && typedNode.evaluate.length === 1
? typedNode.evaluate[0] as IEvaluateNodeArgs
: { expression: null, type: null };
: { expression: null };

return [args.expression];
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const migrateDynamicExpression = (expression: any): object => {
if (argValue && typeof(argValue) === 'string' && (argValue as string).includes('{{')){
return {
handled: true,
value: { evaluate: [ { expression: argValue, type: 'text' } ] },
value: { evaluate: [ { expression: argValue } ] },
};
}
return {
Expand Down
1 change: 0 additions & 1 deletion shesha-reactjs/src/utils/jsonLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ export const convertJsonLogicNode = (jsonLogic: object, options: IJsonLogicConve

export interface IEvaluateNodeArgs {
expression: string;
type: string;
};

export interface IEvaluateNode {
Expand Down

0 comments on commit 71eb442

Please sign in to comment.