get clearUrl() {
const { protocol, host, pathname, searchParams } = new URL(window.location)
return `${protocol}//${host}${pathname}${searchParams.has('q') ? '?q=' + searchParams.get('q').toString() : ''}`;
},
The problem is that there is a double back-slash string inside that template literal and the HTML minifier cannot interpret that properly in .phtml files in this context. My guess is that it turns everything after "//" into a comment.
get clearUrl() {
const { protocol, host, pathname, searchParams } = new URL(window.location),
qParam = searchParams.has('q') ? '?q=' + searchParams.get('q').toString() : '',
endParam = protocol + '//' + host + pathname + qParam;
return endParam;
},