Remove some unnecessary console messages for new outfit viewer

For static image layers, this was *always* logging that we failed to
send the frame a "pause" message. Which, like, of course!

It makes sense to log the notable circumstance where we send a message
we *expect* to arrive, but the frame isn't loaded yet. But if there's
just no frame, ignore it and don't bother to say so.
This commit is contained in:
Emi Matchu 2024-09-05 17:37:16 -07:00
parent 2e48376c5a
commit 4d5b583432

View file

@ -165,9 +165,12 @@ class OutfitLayer extends HTMLElement {
#sendMessageToIframe(message) {
// If we have no frame or it hasn't loaded, ignore this message.
if (this.iframe?.contentWindow == null) {
if (this.iframe == null) {
return;
}
if (this.iframe.contentWindow == null) {
console.debug(
`Ignoring message, frame not loaded: `,
`Ignoring message, frame not loaded yet: `,
this.iframe,
message,
);