From 483e19adb605c76a9038b11d18ed44cd0357334e Mon Sep 17 00:00:00 2001 From: Marc Date: Wed, 22 Apr 2015 09:32:28 +0200 Subject: [PATCH] exc.stack -> (exc.stack || exc) so if exc is a message (e.g. knockout sends a message) you'll get the message instead of undefined --- src/octoprint/static/js/app/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octoprint/static/js/app/main.js b/src/octoprint/static/js/app/main.js index 8d3b4e99..7eddbb2b 100644 --- a/src/octoprint/static/js/app/main.js +++ b/src/octoprint/static/js/app/main.js @@ -458,7 +458,7 @@ $(function() { ko.applyBindings(viewModel, element); log.debug("View model", viewModel.constructor.name, "bound to", target); } catch (exc) { - log.error("Could not bind view model", viewModel.constructor.name, "to target", target, ":", exc.stack); + log.error("Could not bind view model", viewModel.constructor.name, "to target", target, ":", (exc.stack || exc)); } }); }