diff --git a/apps/chrome-extension/src/manifest.json b/apps/chrome-extension/src/manifest.json index 2860dce..b4d09cf 100644 --- a/apps/chrome-extension/src/manifest.json +++ b/apps/chrome-extension/src/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "PixiJS Devtools", "description": "Debug games and apps written with PixiJS", - "version": "2.6.0", + "version": "2.6.1", "devtools_page": "pixi-devtools.html", "icons": { "16": "icon.png", diff --git a/apps/firefox-extension/src/manifest.json b/apps/firefox-extension/src/manifest.json index 258ac72..ed600ce 100644 --- a/apps/firefox-extension/src/manifest.json +++ b/apps/firefox-extension/src/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "PixiJS Devtools", "description": "Debug games and apps written with PixiJS", - "version": "2.6.0", + "version": "2.6.1", "devtools_page": "pixi-devtools.html", "icons": { "48": "icon.png", diff --git a/packages/pixi-panel/src/pixi-devtools/pixiDevtools.ts b/packages/pixi-panel/src/pixi-devtools/pixiDevtools.ts index 5d7fd93..ed9072b 100644 --- a/packages/pixi-panel/src/pixi-devtools/pixiDevtools.ts +++ b/packages/pixi-panel/src/pixi-devtools/pixiDevtools.ts @@ -12,11 +12,12 @@ type EventDetail = { activate: UniversalNode | undefined; }; -let mode: "PIXI" | "PHASER" | undefined; export default function pixiDevtools() { const eventTarget = new EventTarget(); const win = window as any; + let mode: "PIXI" | "PHASER" | undefined; + function getGlobal(varname: string) { if (win[varname]) { return win[varname]; @@ -57,11 +58,13 @@ export default function pixiDevtools() { } const renderer = getGlobal("__PIXI_RENDERER__"); if (renderer) { - return renderer.lastObjectRendered; + // eslint-disable-next-line no-underscore-dangle + return renderer.lastObjectRendered ?? renderer._lastObjectRendered; } const patched = getGlobal("__PATCHED_RENDERER__"); if (patched) { - return patched.lastObjectRendered; + // eslint-disable-next-line no-underscore-dangle + return patched.lastObjectRendered ?? patched._lastObjectRendered; } return undefined; },