From 93cb8b20bf06e62c3b731bf5628e8026f9864742 Mon Sep 17 00:00:00 2001 From: "Efe S. Kucuk" Date: Tue, 25 Jan 2022 22:35:58 +0300 Subject: [PATCH] fix inline component style directive --- src/compiler/compile/nodes/InlineComponent.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compiler/compile/nodes/InlineComponent.ts b/src/compiler/compile/nodes/InlineComponent.ts index 9d88b136cd..d1f845d6be 100644 --- a/src/compiler/compile/nodes/InlineComponent.ts +++ b/src/compiler/compile/nodes/InlineComponent.ts @@ -71,7 +71,10 @@ export default class InlineComponent extends Node { case 'Transition': return component.error(node, compiler_errors.invalid_transition); - + + case 'StyleDirective': + throw new Error(`Currently, style directives only work on elements. Error occurred on <${this.name}> component.`); + default: throw new Error(`Not implemented: ${node.type}`); }