mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-03-31 15:20:32 +08:00
fix(engine): Init validate only if none.
This commit is contained in:
parent
6310d13af0
commit
9b5bd70771
@ -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 = {};
|
||||
|
@ -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);
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user