message: Testing for i.bucket.vaultBucket
  i.bucket.vaultBucket isn't guaranteed.
diff: @@ -193,7 +193,7 @@ export function D2StoreFactory($i18next, dimInfoService) {
  },
  spaceLeftForItem: function(item) {
  const openStacks = Math.max(0, this.capacityForItem(item) -
  - count(this.items, (i) => i.bucket.vaultBucket.id === item.bucket.vaultBucket.id));
  + count(this.items, (i) => i.bucket.vaultBucket && (i.bucket.vaultBucket.id === item.bucket.vaultBucket.id)));
  const maxStackSize = item.maxStackSize || 1;
  if (maxStackSize === 1) {
  return openStacks;
  