This is my code:
import wixData from 'wix-data'; $w.onReady(function () { errorTextResult(); }); export function input1_keyPress(event) { let SearchValue = $w("#input1").value; $w("#dataset1").setFilter(wixData.filter().contains('location', SearchValue)) } function errorTextResult () { $w("#dataset1").onReady( () => { let count = $w("#dataset1").getTotalCount(); if (count > 0) { $w("#text4").hide(); } if (count === 0) $w("#text4").show(); } ); }
You're missing a curly parentheses: { and that might cause an error.
It should be:
//....code.. if (count === 0) { // <<<< attention $w("#text4").show(); } //code...