From daece8a4d9ae4cbf9bef0520ef59a5e0ddd8e9f2 Mon Sep 17 00:00:00 2001 From: dkanada Date: Wed, 10 Jun 2020 13:56:55 +0900 Subject: [PATCH] add code suggestions --- src/components/viewManager/viewManager.js | 5 +++-- src/controllers/dashboard/logs.js | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/viewManager/viewManager.js b/src/components/viewManager/viewManager.js index e37c871232..8e17264f9f 100644 --- a/src/components/viewManager/viewManager.js +++ b/src/components/viewManager/viewManager.js @@ -21,10 +21,11 @@ define(['viewContainer', 'focusManager', 'queryString', 'layoutManager'], functi if (!newView.initComplete) { newView.initComplete = true; + var controller; if (typeof options.controllerFactory === 'function') { - var controller = new options.controllerFactory(newView, eventDetail.detail.params); + controller = new options.controllerFactory(newView, eventDetail.detail.params); } else if (options.controllerFactory && typeof options.controllerFactory.default === 'function') { - var controller = new options.controllerFactory.default(newView, eventDetail.detail.params); + controller = new options.controllerFactory.default(newView, eventDetail.detail.params); } if (!options.controllerFactory || dispatchPageEvents) { diff --git a/src/controllers/dashboard/logs.js b/src/controllers/dashboard/logs.js index bdb9e2537f..7bf2785d50 100644 --- a/src/controllers/dashboard/logs.js +++ b/src/controllers/dashboard/logs.js @@ -1,6 +1,5 @@ import datetime from 'datetime'; import loading from 'loading'; -import appHost from 'apphost'; import 'emby-button'; import 'listViewStyle'; import 'flexStyles';