diff --git a/IPython/html/static/base/js/utils.js b/IPython/html/static/base/js/utils.js index b3f7b3a..90eca6e 100644 --- a/IPython/html/static/base/js/utils.js +++ b/IPython/html/static/base/js/utils.js @@ -448,6 +448,10 @@ IPython.utils = (function (IPython) { // http://stackoverflow.com/questions/2400935/browser-detection-in-javascript var browser = (function() { + if (typeof navigator === 'undefined') { + // navigator undefined in node + return 'None'; + } var N= navigator.appName, ua= navigator.userAgent, tem; var M= ua.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i); if (M && (tem= ua.match(/version\/([\.\d]+)/i))!= null) M[2]= tem[1];