Fix: display error on install page
This commit is contained in:
		
							parent
							
								
									64aa9fcf53
								
							
						
					
					
						commit
						42e97ef153
					
				| 
						 | 
				
			
			@ -242,7 +242,7 @@
 | 
			
		|||
    const contents = Array.isArray(err) ?
 | 
			
		||||
      [$create('pre', err.join('\n'))] :
 | 
			
		||||
      [err && err.message && $create('pre', err.message) || err || 'Unknown error'];
 | 
			
		||||
    if (Number.isInteger(err.index)) {
 | 
			
		||||
    if (Number.isInteger(err.index) && typeof contents[0] === 'string') {
 | 
			
		||||
      const pos = cm.posFromIndex(err.index);
 | 
			
		||||
      contents[0] = `${pos.line + 1}:${pos.ch + 1} ` + contents[0];
 | 
			
		||||
      contents.push($create('pre', drawLinePointer(pos)));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user