"Uncaught (in promise) NavigationBlocked" in the browser

How should I hide "Uncaught (in promise) NavigationBlocked" in the browser console when I use the app:guard?
May I have the way?

// myapp.js
import "./styles/app.css";
import { JetApp, EmptyRouter, HashRouter, plugins} from "webix-jet";
import session from "models/session";

export default class MyApp extends JetApp{
constructor(config){
const defaults = {
router: BUILD_AS_MODULE ? EmptyRouter : HashRouter,
debug: !PRODUCTION,
start: "/top/start"
};

    super({ ...defaults, ...config });

    this.use( plugins.User, { 
        model : session,
        public: path => path.indexOf("/register") > -1 
    });

    this.attachEvent("app:guard", function(url, view, nav){           
         var current_Url = this.getUrlString();  
        if(!blockUrl.includes(url)){
            nav.redirect = current_Url;
        }                            
    });   
}  

}

if (!BUILD_AS_MODULE){
webix.ready(() => new MyApp().render() ); // mandatory!
}

const blockUrl = [
"/login",
"/register",
"/top/start",
"/top/applications"
];

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!