@urso/core 0.7.70 → 0.7.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urso/core",
3
- "version": "0.7.70",
3
+ "version": "0.7.72",
4
4
  "description": "HTML5 game engine",
5
5
  "main": "build/js/index.js",
6
6
  "author": "Megbrimef",
@@ -302,6 +302,11 @@ class ModulesObjectsModelsSpine extends ModulesObjectsBaseModel {
302
302
  }
303
303
 
304
304
  _addToSlot(slotName, object, replaceSlotContents) {
305
+ if (!object?._baseObject) {
306
+ Urso.logger.warn('ModulesObjectsModelsSpine _addToSlot error: invalid object ' + object);
307
+ return;
308
+ }
309
+
305
310
  const spine = this._baseObject;
306
311
  const slotIndex = spine.spineData.slots.findIndex(({ name }) => name === slotName);
307
312
  const currentSlot = spine.slotContainers[slotIndex];
@@ -324,7 +324,9 @@ class ModulesScenesPixiWrapper {
324
324
  * reserve loop, when browser tab is inactive
325
325
  * @param {Boolean} isVisible
326
326
  */
327
- _visibilityChangeHandler(isVisible) {
327
+ _visibilityChangeHandler(state) {
328
+ const isVisible = state === 'visible';
329
+
328
330
  if (isVisible) {
329
331
  if (this.passiveCallIntervalId) {
330
332
  clearInterval(this.passiveCallIntervalId);