Code isn't working on mobile view?

Hello,

My database is synced and displays properly in desktop editor preview & published site on desktop view, but fails in mobile editor preview and published site on mobile view.

import wixData from ‘wix-data’;
import wixWindow from ‘wix-window’;

$w.onReady(function () {

$w('#resultsRepeater').onItemReady(($w, itemData, index) => { 
	$w("#chapterElement").text = itemData.chapter; 
	$w("#spocElement").text = itemData.name; 
	$w("#emailElement").text = itemData.email; 
	$w("#phoneElement").text = itemData.calling; 
	$w("#whatsappElement").text = itemData.whatsapp; 
}); 

let searchValue = $w('#NMinput').value; 

console.log(“searching”);// This console log shows on both desktop and mobile editor preview

wixData.query('Profile') 
	.contains('chapter', searchValue) 
	.ascending('chapter', 'name') 
	.find() 
	.then(results => { 

console.log(“setting data”);//This console log shows only on desktop preview and not for mobile editor preview

	$w('#resultsRepeater').data = results.items; 
	}); 

	$w('#resultsRepeater').show(); 
	$w('#resultsRepeater').expand(); 

});

Here’s the link

Please guide, where am doing wrong…

Thanking in anticipation