Skip to content

Commit

Permalink
Clarify warning messages (WordPress#61720)
Browse files Browse the repository at this point in the history
Co-authored-by: DAreRodz <[email protected]>
Co-authored-by: michalczaplinski <[email protected]>
  • Loading branch information
3 people authored and bph committed May 20, 2024
1 parent 56f7921 commit e99d6c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/interactivity/src/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/interactivity/src/vdom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,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 ] || '';
Expand Down

0 comments on commit e99d6c3

Please sign in to comment.