We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1981603 commit 7c34f41Copy full SHA for 7c34f41
packages/interactivity/src/directives.js
@@ -242,7 +242,11 @@ export default () => {
242
if ( defaultEntry ) {
243
const { namespace, value } = defaultEntry;
244
// Check that the value is a JSON object. Send a console warning if not.
245
- if ( SCRIPT_DEBUG && ! isPlainObject( value ) ) {
+ if (
246
+ typeof SCRIPT_DEBUG !== 'undefined' &&
247
+ SCRIPT_DEBUG === true &&
248
+ ! isPlainObject( value )
249
+ ) {
250
// eslint-disable-next-line no-console
251
console.warn(
252
`The value of data-wp-context in "${ namespace }" store must be a valid stringified JSON object.`
0 commit comments