From 9d31c179b198c8b7742715d09594e4055c19b8a7 Mon Sep 17 00:00:00 2001 From: Thijs Louisse Date: Tue, 6 Dec 2022 10:30:55 +0100 Subject: [PATCH] chore: improve SlotMixin feedback --- packages/ui/components/core/src/SlotMixin.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/ui/components/core/src/SlotMixin.js b/packages/ui/components/core/src/SlotMixin.js index 6f58ede66..a83cceb17 100644 --- a/packages/ui/components/core/src/SlotMixin.js +++ b/packages/ui/components/core/src/SlotMixin.js @@ -196,7 +196,8 @@ const SlotMixinImplementation = superclass => this.__slotsThatNeedRerender.add(slotName); } else { throw new Error( - 'Please provide a function inside "get slots()" returning TemplateResult | Node | {template:TemplateResult, afterRender?:function} | undefined', + `Slot "${slotName}" configured inside "get slots()" (in prototype) of ${this.constructor.name} may return these types: TemplateResult | Node | {template:TemplateResult, afterRender?:function} | undefined. + You provided: ${slotFunctionResult}`, ); } }