Replace let by const where possible.
This commit is contained in:
parent
ea3219fa10
commit
0ea662d8fe
@ -32,7 +32,7 @@ export default class Collection extends events.EventEmitter {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let data = {
|
const data = {
|
||||||
add: {data: {}},
|
add: {data: {}},
|
||||||
remove: {data: {}},
|
remove: {data: {}},
|
||||||
update: {data: {}}
|
update: {data: {}}
|
||||||
@ -165,7 +165,7 @@ export default class Collection extends events.EventEmitter {
|
|||||||
touch (keyOrObjectWithId) {
|
touch (keyOrObjectWithId) {
|
||||||
const [key] = this._resolveEntry(keyOrObjectWithId, null)
|
const [key] = this._resolveEntry(keyOrObjectWithId, null)
|
||||||
this._assertHas(key)
|
this._assertHas(key)
|
||||||
let value = this.get(key)
|
const value = this.get(key)
|
||||||
if (typeof value !== 'object' || value === null) {
|
if (typeof value !== 'object' || value === null) {
|
||||||
throw new IllegalTouch('Touching a scalar. Not an object')
|
throw new IllegalTouch('Touching a scalar. Not an object')
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user