File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -366,6 +366,7 @@ function finishView(view) {
366366 } ,
367367 dataType : "jsonp" ,
368368 success : function ( data ) {
369+ if ( ! data . query || ! data . query . results ) return ;
369370 var json = data . query . results . json ;
370371 var html = json . html ;
371372 var ratio = json . height / json . width ;
Original file line number Diff line number Diff line change @@ -292,11 +292,19 @@ var statusLength = null;
292292var statusKeymap = null ;
293293var statusIndent = null ;
294294
295- $ . get ( serverurl + '/views/statusbar.html' , function ( template ) {
296- statusBarTemplate = template ;
297- } ) ;
295+ function getStatusBarTemplate ( callback ) {
296+ $ . get ( serverurl + '/views/statusbar.html' , function ( template ) {
297+ statusBarTemplate = template ;
298+ if ( callback ) callback ( ) ;
299+ } ) ;
300+ }
301+ getStatusBarTemplate ( ) ;
298302
299303function addStatusBar ( ) {
304+ if ( ! statusBarTemplate ) {
305+ getStatusBarTemplate ( addStatusBar ) ;
306+ return ;
307+ }
300308 statusBar = $ ( statusBarTemplate ) ;
301309 statusCursor = statusBar . find ( '.status-cursor' ) ;
302310 statusFile = statusBar . find ( '.status-file' ) ;
@@ -1469,7 +1477,7 @@ socket.on('info', function (data) {
14691477} ) ;
14701478socket . on ( 'error' , function ( data ) {
14711479 console . error ( data ) ;
1472- if ( data . message . indexOf ( 'AUTH failed' ) === 0 )
1480+ if ( data . message && data . message . indexOf ( 'AUTH failed' ) === 0 )
14731481 location . href = "./403" ;
14741482} ) ;
14751483socket . on ( 'disconnect' , function ( data ) {
You can’t perform that action at this time.
0 commit comments