Skip to content

Commit 6e8a0ca

Browse files
committed
Fix error in has-key logic
1 parent cff3cc7 commit 6e8a0ca

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

proposal/nested-map-functions.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,13 @@ has-key($map, $keys...)
201201

202202
* If there is more than one element in `$keys`:
203203

204-
* Let `map` be the value assigned to `key` in `$map`
204+
* Let `value` be the value assigned to `key` in `$map`
205+
206+
* If `value` is not a map, return boolean `false`.
205207

206208
* Let `keys` be all but the first element in `$keys`
207209

208-
* Call `has-key()` with `map` and expanded `keys` as arguments
210+
* Call `has-key()` with `value` and expanded `keys` as arguments
209211

210212
* Otherwise, return boolean `true`
211213

@@ -273,8 +275,7 @@ merge($map1, $args...)
273275

274276
* Let `set-args` be the result of appending `sub-merged` to the list `keys`
275277

276-
* Return the result of calling `set()` with `$map1` and expanded `set-args`
277-
as arguments.
278+
* Call `set()` with `$map1` and expanded `set-args` as arguments.
278279

279280
* Otherwise:
280281

0 commit comments

Comments
 (0)