Skip to content

Commit

Permalink
Merge pull request #387 from vector-im/bwindels/dontassumecontainerat…
Browse files Browse the repository at this point in the history
…load

Don't assume container node exists when loading bundle
  • Loading branch information
bwindels authored Jun 4, 2021
2 parents 46bfab3 + 919542f commit 23321b4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/platform/web/ui/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 23321b4

Please sign in to comment.