Skip to content

Commit 1b311f3

Browse files
authored
erratum in Example 6 regarding behavior of key generator with in-line key (#444)
#443 Co-authored-by: Steve M. Kim <[email protected]>
1 parent 4270575 commit 1b311f3

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

index.bs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1789,21 +1789,14 @@ Attempting to store a property on a primitive value will fail and
17891789
throw an error. In the first example below the [=object-store/key
17901790
path=] for the object store is "`foo`". The actual object
17911791
is a primitive with the value, `4`. Trying to define a
1792-
property on that primitive value fails. The same is true for arrays.
1793-
Properties are not allowed on an array. In the second example below,
1794-
the actual object is an array, `[10]`. Trying to define a
1795-
property on the array fails.
1792+
property on that primitive value fails.
17961793

17971794
```js
17981795
const store = db.createObjectStore("store", { keyPath: "foo", autoIncrement: true });
17991796

18001797
// The key generation will attempt to create and store the key path
18011798
// property on this primitive.
18021799
store.put(4); // will throw DataError
1803-
1804-
// The key generation will attempt to create and store the key path
1805-
// property on this array.
1806-
store.put([10]); // will throw DataError
18071800
```
18081801
</div>
18091802

0 commit comments

Comments
 (0)