From c1b183841fd7f20b46e9df2dc7e9f27b91b0b492 Mon Sep 17 00:00:00 2001 From: David Arenas Date: Thu, 16 May 2024 14:36:06 +0200 Subject: [PATCH] Clarify warning messages --- packages/interactivity/src/hooks.tsx | 2 +- packages/interactivity/src/vdom.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/interactivity/src/hooks.tsx b/packages/interactivity/src/hooks.tsx index 2dfc08a43f6fa..f90b5131823d2 100644 --- a/packages/interactivity/src/hooks.tsx +++ b/packages/interactivity/src/hooks.tsx @@ -271,7 +271,7 @@ export const directive = ( const resolve = ( path: string, namespace: string ) => { if ( ! namespace ) { warn( - `The "namespace" cannot be "{}", "null" or an empty string. Path: ${ path }` + `Namespace missing for "${ path }". The value for that path won't be resolved.` ); return; } diff --git a/packages/interactivity/src/vdom.ts b/packages/interactivity/src/vdom.ts index d5238cde49d8e..ad37c20c950e2 100644 --- a/packages/interactivity/src/vdom.ts +++ b/packages/interactivity/src/vdom.ts @@ -142,7 +142,7 @@ export function toVdom( root: Node ): Array< ComponentChild > { ( obj, [ name, ns, value ] ) => { const directiveMatch = directiveParser.exec( name ); if ( directiveMatch === null ) { - warn( `Invalid directive: ${ name }.` ); + warn( `Found malformed directive name: ${ name }.` ); return obj; } const prefix = directiveMatch[ 1 ] || '';