Hi friends,
I have problem in my website. Sometimes I see the bug in the console as below.
VM1531:1 Uncaught SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at receiveMessage (clientlibs.js:60)
When I click into the clientlibs.js:60 it move to var fromTemplateBrowser = JSON.parse(event.data); as below. This function of the AEM core.
function receiveMessage(event) {
if (event.origin !== location.origin) {
return;
}
var fromTemplateBrowser = JSON.parse(event.data);
if (fromTemplateBrowser.sender !== "templatebrowser") {
return;
}
if (fromTemplateBrowser.data) {
var $sink = $templatePicker.data("sink"), path = fromTemplateBrowser.data.path;
$sink.val(path).change();
}
if (fromTemplateBrowser.config) {
var action = fromTemplateBrowser.config.action;
if (action === 'close' || action === 'done') {
$templatePicker.data("modal").hide();
}
}
}
It was not effect to the function of my site. However, I don't want it happen.
How to fix this bug?
Thanks & Best regards,
BienHV