lint: var/let

This commit is contained in:
bordun 2020-03-25 10:47:37 +01:00
parent 9066d49a4c
commit 6654b88dc9

View file

@ -71,7 +71,7 @@ class Script extends Widget {
value: 0
})
} catch(err) {
var stackline = err.stack ? (err.stack.match(/>:([0-9]+):[0-9]+/) || '') : '',
let stackline = err.stack ? (err.stack.match(/>:([0-9]+):[0-9]+/) || '') : '',
line = stackline.length > 1 ? ' at line ' + (parseInt(stackline[1]) - 2) : ''
console.log((this.getProp('id') || this.props.id) + '.script error:\n' + err + line)
this.script = ()=>{}
@ -98,7 +98,7 @@ class Script extends Widget {
meta: false,
})
} catch(err) {
var stackline = err.stack ? (err.stack.match(/>:([0-9]+):[0-9]+/) || '') : '',
let stackline = err.stack ? (err.stack.match(/>:([0-9]+):[0-9]+/) || '') : '',
line = stackline.length > 1 ? ' at line ' + (parseInt(stackline[1]) - 2) : ''
console.log((this.getProp('id') || this.props.id) + '.script error:\n' + err + line)
this.script = ()=>{}