diff --git a/spine-ts/player/src/Player.ts b/spine-ts/player/src/Player.ts index b19d501e8..3361b8382 100644 --- a/spine-ts/player/src/Player.ts +++ b/spine-ts/player/src/Player.ts @@ -217,6 +217,7 @@ module spine { constructor (parent: HTMLElement | string, private config: SpinePlayerConfig) { this.parent = typeof parent === "string" ? document.getElementById(parent) : parent; + if (!this.parent) throw new Error("SpinePlayer parent not found: " + parent); if (config.showControls === void 0) config.showControls = true; let controls = config.showControls ? /*html*/`