fix(engine): Init validate only if none.

This commit is contained in:
Gervwyk 2022-04-19 17:09:17 +02:00
parent 6310d13af0
commit 9b5bd70771
2 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ class Blocks {
block.required = type.isNone(block.required) ? false : block.required;
block.skeleton = type.isNone(block.skeleton) ? null : block.skeleton;
block.style = type.isNone(block.style) ? {} : block.style;
block.validate = type.isNone(block.validate) ? block.validate : [];
block.validate = type.isNone(block.validate) ? [] : block.validate;
block.visible = type.isNone(block.visible) ? true : block.visible;
block.areasLayoutEval = {};

View File

@ -482,7 +482,7 @@ test('parse block loading', () => {
initState: { key: false },
});
const { textInput } = context.RootBlocks.map;
expect(textInput.loading).toEqual({ _state: true });
expect(textInput.loading).toEqual({ _state: 'key' });
expect(textInput.eval.loading).toEqual(true);
});