powergrid-viewer 2.0.12 → 2.0.13

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": "powergrid-viewer",
3
- "version": "2.0.12",
3
+ "version": "2.0.13",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/boardgamers/powergrid.git",
@@ -1080,7 +1080,11 @@ export default class Game extends Vue {
1080
1080
  // scrubber renders reconstructed MID-game states, whose own `ended()` is
1081
1081
  // false however long ago the game finished, so it cannot be asked. See
1082
1082
  // `moneyIsPublic`.
1083
- if (replaceState && ended(state)) {
1083
+ // `state` is null until the platform posts the first one: launch() mounts
1084
+ // the viewer with `state: null` and the immediate `@Watch('state')` fires
1085
+ // at mount, so this runs once with null (hard refresh / first load) and
1086
+ // must not dereference it.
1087
+ if (replaceState && state && ended(state)) {
1084
1088
  this.gameIsOver = true;
1085
1089
  }
1086
1090