diff --git a/install-usercss/install-usercss.js b/install-usercss/install-usercss.js index 663b40ec..755d3308 100644 --- a/install-usercss/install-usercss.js +++ b/install-usercss/install-usercss.js @@ -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)));