Show error in box if one is available
Summary: Add a check to prevent the odd error when the box is no longer available to display an error. Reviewed By: antonk52 Differential Revision: D46763634 fbshipit-source-id: 6ac2c404c842ff989b037c991b5f085baacd2f9a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
8f20631f6a
commit
7fcaf52c71
@@ -81,8 +81,10 @@
|
||||
}
|
||||
|
||||
const box = document.querySelector('.__infinity-dev-box-error');
|
||||
box.removeAttribute('hidden');
|
||||
box.textContent = text;
|
||||
if (box) {
|
||||
box.removeAttribute('hidden');
|
||||
box.textContent = text;
|
||||
}
|
||||
}
|
||||
|
||||
// load correct theme (n.b. this doesn't handle system value specifically, will assume light in such cases)
|
||||
|
||||
@@ -109,7 +109,9 @@
|
||||
}
|
||||
|
||||
const box = document.getElementById('loading');
|
||||
box.textContent = text;
|
||||
if (box) {
|
||||
box.textContent = text;
|
||||
}
|
||||
}
|
||||
window.flipperShowError = openError;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user