Panopticon-AI-team / panopticon

A wargaming platform compatible with reinforcement learning agents
https://www.panopticon-ai.com
Apache License 2.0
10 stars 0 forks source link

Red Mission Editor Causes Crash #91

Closed orgulous closed 1 month ago

orgulous commented 1 month ago

Describe the bug Crash caused by mission editor

To Reproduce Steps to reproduce the behavior: Toggle to Red Then click on mission editor This causes the crash (probably because an empty list causes the mission editor to crash?)

Expected behavior No crashing

Additional context ERROR Cannot read properties of undefined (reading 'assignedUnitIds') TypeError: Cannot read properties of undefined (reading 'assignedUnitIds') at MissionEditor (http://localhost:3000/static/js/bundle.js:9361:115) at renderWithHooks (http://localhost:3000/static/js/bundle.js:65879:22) at mountIndeterminateComponent (http://localhost:3000/static/js/bundle.js:69850:17) at beginWork (http://localhost:3000/static/js/bundle.js:71153:20) at HTMLUnknownElement.callCallback (http://localhost:3000/static/js/bundle.js:56135:18) at Object.invokeGuardedCallbackDev (http://localhost:3000/static/js/bundle.js:56179:20) at invokeGuardedCallback (http://localhost:3000/static/js/bundle.js:56236:35) at beginWork$1 (http://localhost:3000/static/js/bundle.js:76134:11) at performUnitOfWork (http://localhost:3000/static/js/bundle.js:75382:16) at workLoopSync (http://localhost:3000/static/js/bundle.js:75305:9) ERROR Cannot read properties of undefined (reading 'assignedUnitIds') TypeError: Cannot read properties of undefined (reading 'assignedUnitIds') at MissionEditor (http://localhost:3000/static/js/bundle.js:9361:115) at renderWithHooks (http://localhost:3000/static/js/bundle.js:65879:22) at mountIndeterminateComponent (http://localhost:3000/static/js/bundle.js:69850:17) at beginWork (http://localhost:3000/static/js/bundle.js:71153:20) at HTMLUnknownElement.callCallback (http://localhost:3000/static/js/bundle.js:56135:18) at Object.invokeGuardedCallbackDev (http://localhost:3000/static/js/bundle.js:56179:20) at invokeGuardedCallback (http://localhost:3000/static/js/bundle.js:56236:35) at beginWork$1 (http://localhost:3000/static/js/bundle.js:76134:11) at performUnitOfWork (http://localhost:3000/static/js/bundle.js:75382:16) at workLoopSync (http://localhost:3000/static/js/bundle.js:75305:9) ERROR Cannot read properties of undefined (reading 'assignedUnitIds') TypeError: Cannot read properties of undefined (reading 'assignedUnitIds') at MissionEditor (http://localhost:3000/static/js/bundle.js:9361:115) at renderWithHooks (http://localhost:3000/static/js/bundle.js:65879:22) at mountIndeterminateComponent (http://localhost:3000/static/js/bundle.js:69850:17) at beginWork (http://localhost:3000/static/js/bundle.js:71153:20) at beginWork$1 (http://localhost:3000/static/js/bundle.js:76112:18) at performUnitOfWork (http://localhost:3000/static/js/bundle.js:75382:16) at workLoopSync (http://localhost:3000/static/js/bundle.js:75305:9) at renderRootSync (http://localhost:3000/static/js/bundle.js:75278:11) at recoverFromConcurrentError (http://localhost:3000/static/js/bundle.js:74770:24) at performSyncWorkOnRoot (http://localhost:3000/static/js/bundle.js:74979:24)

duyminh1998 commented 1 month ago

Resolved by https://github.com/Panopticon-AI-team/panopticon/pull/89