error may be an object
This commit is contained in:
parent
88a0a3858c
commit
3d6b55e53e
|
@ -419,7 +419,7 @@ function LivePreview() {
|
||||||
el.hidden = true;
|
el.hidden = true;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (Array.isArray(err)) {
|
if (Array.isArray(err)) {
|
||||||
err = err.join('\n');
|
err = err.map(e => e.message || e).join('\n');
|
||||||
} else if (err && err.index != null) {
|
} else if (err && err.index != null) {
|
||||||
// FIXME: this would fail if editors[0].getValue() !== data.sourceCode
|
// FIXME: this would fail if editors[0].getValue() !== data.sourceCode
|
||||||
const pos = editor.getEditors()[0].posFromIndex(err.index);
|
const pos = editor.getEditors()[0].posFromIndex(err.index);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user