Closed KernelDeimos closed 1 month ago
@KernelDeimos
The issue appears to be related to the puter.kv.get()
function. Unlike the list()
function, which does not raise this exception, when you try to get(someKey)
for a key that does not exist in the KV store, it throws an error {success: false, error: 'HOUR is not defined'}
. According to the documentation, this should return null
instead.
The todo example encounters this error immediately upon execution. A minimal reproducible example would be simply calling get()
with a non-existent key:
puter.kv.get('todos').then((todos) => {
console.log(todos);
});
P.S.: Attempting to load puter.js
at the <head>
or at the bottom of the <body>
did not resolve the issue.
This is fixed and deployed now, thanks for reporting!
on Discord