mirror of
https://github.com/liabru/matter-js.git
synced 2024-12-25 13:39:06 -05:00
Merge branch 'pr/440'
* pr/440: Do not warn on missing render.element if the canvas is already parented (because it was passed in at construction).
This commit is contained in:
commit
2dc7a0bf5e
1 changed files with 37 additions and 37 deletions
|
@ -106,7 +106,7 @@ var Mouse = require('../core/Mouse');
|
||||||
|
|
||||||
if (Common.isElement(render.element)) {
|
if (Common.isElement(render.element)) {
|
||||||
render.element.appendChild(render.canvas);
|
render.element.appendChild(render.canvas);
|
||||||
} else {
|
} else if (!render.canvas.parentNode) {
|
||||||
Common.log('Render.create: options.element was undefined, render.canvas was created but not appended', 'warn');
|
Common.log('Render.create: options.element was undefined, render.canvas was created but not appended', 'warn');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue