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

This commit is contained in:
Marc committed 2015-04-22 10:00:45 +02:00
1 parent 3304a7e341
commit 483e19adb6
1 file changed
+1 -1
+1 -1
View File
@@ -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));
}
});
}