Fix TSLint issues
As this is the starter project it should be provided without any errors. This commit restructures some code to solve the TSLint issues.
This commit is contained in:
@@ -38,8 +38,8 @@ export class ErrorMapper {
|
||||
while (match = re.exec(stack)) {
|
||||
if (match[2] === "main") {
|
||||
const pos = this.consumer.originalPositionFor({
|
||||
line: parseInt(match[3], 10),
|
||||
column: parseInt(match[4], 10)
|
||||
column: parseInt(match[4], 10),
|
||||
line: parseInt(match[3], 10)
|
||||
});
|
||||
|
||||
if (pos.line != null) {
|
||||
@@ -75,7 +75,8 @@ export class ErrorMapper {
|
||||
} catch (e) {
|
||||
if (e instanceof Error) {
|
||||
if ("sim" in Game.rooms) {
|
||||
console.log(`<span style='color:red'>Source maps don't work in the simulator - displaying original error<br>${_.escape(e.stack)}</span>`)
|
||||
const message = `Source maps don't work in the simulator - displaying original error`;
|
||||
console.log(`<span style='color:red'>${message}<br>${_.escape(e.stack)}</span>`);
|
||||
} else {
|
||||
console.log(`<span style='color:red'>${_.escape(this.sourceMappedStackTrace(e))}</span>`);
|
||||
}
|
||||
@@ -84,6 +85,6 @@ export class ErrorMapper {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user