Skip to content

Commit

Permalink
Expand Nuxt data script
Browse files Browse the repository at this point in the history
  • Loading branch information
wvengen committed Feb 23, 2024
1 parent 35fa921 commit dea3de1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions _posts/2024-02-06-making-sense-of-nuxt-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ def _parseNuxtDict(j, d):
return _parseNuxtDict(j, j[d[1]])
elif d[0] == 'Reactive':
return None # not supported
elif d[0] == 'null':
# dict-as-list, ignoring first item
return {k: _parseNuxtDict(j, j[v]) for (k,v) in zip(d[1::2], d[2::2])}
else:
return [_parseNuxtDict(j, j[v]) for v in d]
else:
Expand Down

0 comments on commit dea3de1

Please sign in to comment.