mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-11 04:27:40 +01:00
Merge pull request #387 from vector-im/bwindels/dontassumecontaineratload
Don't assume container node exists when loading bundle
This commit is contained in:
commit
23321b4c76
@ -14,10 +14,13 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
const container = document.querySelector(".hydrogen");
|
||||
let container;
|
||||
|
||||
export function spinner(t, extraClasses = undefined) {
|
||||
if (container.classList.contains("legacy")) {
|
||||
if (container === undefined) {
|
||||
container = document.querySelector(".hydrogen");
|
||||
}
|
||||
if (container?.classList.contains("legacy")) {
|
||||
return t.div({className: "spinner"}, [
|
||||
t.div(),
|
||||
t.div(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user