Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Don't use async inside data-wp-watch
Browse files Browse the repository at this point in the history
  • Loading branch information
luisherranz authored Oct 13, 2023
1 parent f1e0cdf commit 9ae9002
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions assets/js/interactivity/directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,7 @@ export default () => {
// data-wc-watch--[name]
directive( 'watch', ( { directives: { watch }, evaluate } ) => {
watch.forEach( ( entry ) => {
useSignalEffect( async () => {
const result = evaluate( entry );
return await result;
} );
useSignalEffect( () => evaluate( entry ) );
} );
} );

Expand Down

0 comments on commit 9ae9002

Please sign in to comment.