src/app-mediator.js
Function gotoPage
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const gotoPage = function (obj, previousPoppedUrl, pageData = {}, changeUrl = true) {
let nextPage;
let route = '';
/**
File app-mediator.js
has 266 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* Mediator controls the current page and modules
*
* @fileoverview Defines the App Mediator
*
Function loadSuccess
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const loadSuccess = function (response) {
// if a redirection was detected by the browser with the original goto replicate it
if (!!response.redirected) {
window.history.replaceState({
Avoid deeply nested control flow statements. Open
Open
if (!!changeUrl) {
window.history.pushState({
data: {
mediator: true
}
Avoid deeply nested control flow statements. Open
Open
if (!App.pages.loaded(obj)) {
// Raise the flag to mark we are in the process
// of loading a new page
mediatorIsLoadingPage = true;