checking empty query parameters in nuxt

To check for an undefined value you can use:

if (typeof query.q !== 'undefined')

typeof returns the data type as a string, which makes checking for undefined values possible.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top