mirror of
https://github.com/liriliri/eruda.git
synced 2026-03-24 09:48:37 +08:00
Use let instead of var
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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: {} })
|
||||
|
||||
Reference in New Issue
Block a user