@d-mok/quasar-app-extension-quasar-axe 2.0.17 → 2.0.18

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": "@d-mok/quasar-app-extension-quasar-axe",
3
- "version": "2.0.17",
3
+ "version": "2.0.18",
4
4
  "description": "A Quasar App Extension",
5
5
  "author": "d-mok <49301824+d-mok@users.noreply.github.com>",
6
6
  "license": "MIT",
@@ -63,9 +63,17 @@ export function TABLE<
63
63
  this.order(...ordering)
64
64
  }
65
65
 
66
- /** Get an item by `criteria`. If not found, return a new object. */
66
+ /** Get an item by `criteria`. If not found, throw error. */
67
67
  got(criteria: Criteria<T>): T {
68
- return this.get(criteria) ?? new EntityClass({})
68
+ let obj = this.get(criteria)
69
+ if (obj === undefined) {
70
+ throw (
71
+ EntityClass.name +
72
+ ' has no element matching ' +
73
+ JSON.stringify(criteria)
74
+ )
75
+ }
76
+ return obj
69
77
  }
70
78
 
71
79
  /** make reactive */