Use let instead of var

This commit is contained in:
redhoodsu
2018-08-20 16:45:35 +08:00
parent 0ce56c849f
commit a89654c696
30 changed files with 90 additions and 94 deletions

View File

@@ -10,8 +10,8 @@ let callbacks = {},
if (isWorkerSupported) {
tryIt(function() {
/* Some browsers like uc mobile doesn't destroy worker properly after refreshing.
* After a few times of visiting, it reaches the maximum number of workers per site.
*/
* After a few times of visiting, it reaches the maximum number of workers per site.
*/
worker = new StringifyWorker()
worker.onmessage = function(e) {
let [id, result] = e.data

View File

@@ -287,8 +287,8 @@ class Visitor {
}
visit(val) {
/* Add 0 to distinguish stringify generated id from JsonViewer id.
* When used in web worker, they are not calling the same uniqId method, thus result may be repeated.
*/
* When used in web worker, they are not calling the same uniqId method, thus result may be repeated.
*/
let id = uniqId('erudaJson0')
this._visited.push({ id, val, abstract: {} })