diff --git a/apps/tutorial/public/docs/1-introduction/6-browser-utilities/answer.gjs b/apps/tutorial/public/docs/1-introduction/6-browser-utilities/answer.gjs index fffdecca0..e5b1142d6 100644 --- a/apps/tutorial/public/docs/1-introduction/6-browser-utilities/answer.gjs +++ b/apps/tutorial/public/docs/1-introduction/6-browser-utilities/answer.gjs @@ -4,15 +4,16 @@ let data = { terrain: "desert", }; +let { JSON } = globalThis; + localStorage.setItem('localStorage-item', JSON.stringify(data)); -// Pending update to GlimmerVM that does this automatically -let getItem = localStorage.getItem.bind(localStorage); +let get = (key) => localStorage.getItem(key); diff --git a/apps/tutorial/public/docs/1-introduction/6-browser-utilities/prompt.gjs b/apps/tutorial/public/docs/1-introduction/6-browser-utilities/prompt.gjs index d5cdc0ee4..8f18f29b4 100644 --- a/apps/tutorial/public/docs/1-introduction/6-browser-utilities/prompt.gjs +++ b/apps/tutorial/public/docs/1-introduction/6-browser-utilities/prompt.gjs @@ -4,10 +4,11 @@ let data = { terrain: "desert", }; +let { JSON } = globalThis; + localStorage.setItem('localStorage-item', JSON.stringify(data)); -// Pending update to GlimmerVM that does this automatically -let getItem = localStorage.getItem.bind(localStorage); +let get = (key) => localStorage.getItem(key);