mirror of
https://github.com/liriliri/eruda.git
synced 2026-04-01 10:18:35 +08:00
Disable calling init if already initialized
This commit is contained in:
@@ -31,6 +31,8 @@ import {
|
||||
|
||||
module.exports = {
|
||||
init({ container, tool, autoScale = true, useShadowDom = true } = {}) {
|
||||
if (this._isInit) return
|
||||
|
||||
this._isInit = true
|
||||
this._scale = 1
|
||||
|
||||
@@ -104,6 +106,7 @@ module.exports = {
|
||||
this._unregisterListener()
|
||||
this._$el.remove()
|
||||
evalCss.clear()
|
||||
this._isInit = false
|
||||
},
|
||||
scale(s) {
|
||||
if (isNum(s)) {
|
||||
|
||||
Reference in New Issue
Block a user