What is this.searchType when it fails for you? Can you add this to your code?
console.log(
typeof this.searchType,
this.searchType,
this.searchType.length,
this.searchType.constructor,
(this.searchType.length > 1 && this.searchType.constructor == Array)
);
I never used NuxtJS. So can't help you with that. Just a wild guess, maybe it has something todo with the fact that your "one line if statement" is not on one line? Can you try it with the if () { /**/ } else { /**/ }?
And can't you use the Array.isArray() or the instanceofto check if a variable is an array?
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray
Array.isArray([1, 2, 3]); // true
Array.isArray({foo: 123}); // false
Array.isArray('foobar'); // false
Array.isArray(undefined); // false
or
if (this.searchType instanceof Array) { /* */ }
More info and comparison: https://stackoverflow.com/questions/767486/how-do-you-check-if-a-variable-is-an-array-in-javascript
update in javascript this works perfectly fine.
let searchType = [1,2,3];
// let searchType = {1: '1', 2: '2', 3:'3'};
// let searchType = 1;
// let searchType = '1';
let searchTypeMatch = searchType.length > 1 && searchType.constructor == Array
? console.log('is array')
: console.log('is not an array');