diff --git a/src/octoprint/static/js/app/main.js b/src/octoprint/static/js/app/main.js index 51e2b21c1..eae1d5e51 100644 --- a/src/octoprint/static/js/app/main.js +++ b/src/octoprint/static/js/app/main.js @@ -8,6 +8,11 @@ $(function () { _.mixin({sprintf: sprintf, vsprintf: vsprintf}); + //~~ Knockout setup + + ko.options.createChildContextWithAs = true; + ko.options.foreachHidesDestroyed = true; + //~~ Logging setup log.setLevel(CONFIG_DEBUG ? log.levels.DEBUG : log.levels.INFO); @@ -707,8 +712,6 @@ $(function () { var bindViewModels = function () { try { - ko.options.createChildContextWithAs = true; - ko.options.foreachHidesDestroyed = true; log.info("Going to bind " + allViewModelData.length + " view models..."); _.each(allViewModelData, function (viewModelData) { try {