making use of newly created compiler error

pull/6838/head
henninggross 5 years ago
parent 2d49506ab9
commit 2ac875768e

@ -26,12 +26,17 @@ export default class Animation extends Node {
} }
const block = parent.parent; const block = parent.parent;
if (!block || block.type !== 'EachBlock' || !block.key) { if (!block || block.type !== 'EachBlock') {
// TODO can we relax the 'immediate child' rule? // TODO can we relax the 'immediate child' rule?
component.error(this, compiler_errors.invalid_animation_immediate); component.error(this, compiler_errors.invalid_animation_immediate);
return; return;
} }
if (block && block.type === 'EachBlock' && !block.key) {
component.error(this, compiler_errors.invalid_animation_key);
return;
}
(block as EachBlock).has_animation = true; (block as EachBlock).has_animation = true;
this.expression = info.expression this.expression = info.expression

Loading…
Cancel
Save