index : btroops | |
Virtual board game-aid for BattleTroops, an infantry combat simulator wargame published by FASA in 1989. |
aboutsummaryrefslogtreecommitdiff |
diff options
author | Catalin Mititiuc <webdevcat@proton.me> | 2024-05-22 09:12:47 -0700 |
---|---|---|
committer | Catalin Mititiuc <webdevcat@proton.me> | 2024-05-22 09:12:47 -0700 |
commit | 98e4fd58d8c222652f3a5bd1d8a76f7618824e17 (patch) | |
tree | 12f1486c73f39fa5190dd938f99efb0257094761 /src/modules/observable.js | |
parent | 7395df376deac945fa8f10cbc05c318b1d8dc931 (diff) |
Use observable for end move and prone flag
Diffstat (limited to 'src/modules/observable.js')
-rw-r--r-- | src/modules/observable.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/observable.js b/src/modules/observable.js index e4f6797..c9bea9b 100644 --- a/src/modules/observable.js +++ b/src/modules/observable.js @@ -2,7 +2,7 @@ const observers = {}; export const Observable = Object.freeze({ notify: (event, data) => { - observers[event].forEach((observer) => observer(data)) + (observers[event] || []).forEach((observer) => observer(data)) }, subscribe: (event, func) => { |