if no app div in html
This commit is contained in:
parent
de07a88d56
commit
9e75d76d54
1 changed files with 5 additions and 0 deletions
|
@ -33,6 +33,11 @@ export const Minesweeper = function() {
|
|||
let customWrapper = document.createElement('div');
|
||||
customWrapper.setAttribute('id', 'custom-wrapper');
|
||||
let appElement = document.getElementById('app');
|
||||
if (!appElement) {
|
||||
const body = document.getElementsByTagName('body')[0];
|
||||
appElement = document.createElement('div');
|
||||
body.append(appElement);
|
||||
}
|
||||
let leaderWrapper = document.createElement('div');
|
||||
|
||||
let isMobile = false;
|
||||
|
|
Loading…
Reference in a new issue