Uncaught ReferenceError: liferay is not defined

445 views Asked by At

Hello Everyone! I'm getting this Error from my Console. Here is my Screenshot:

enter image description here

Liferay.on("endNavigate", (function(e) {
    dropdownMegaMenu(),
    secondaryNavMobile()
}
)),


Liferay.on("endNavigate", (function(e) {
    $(".banner-prompt-display").length && $(".banner-prompt").delay(2e3).slideDown("slow", (function() {}
    ))
}
));

enter image description here

How can i remove this error from my console? i would be very happy if anyone can able to fix this issues. Thank you!!

1

There are 1 answers

1
SAIF AHMED ANIK On

If your only purpose is to remove that error from console, you can add

console.clear();

at the end of your JavaScript file, where you have used Liferay keyword. It would clear all the logs and error from your console.