From 75b7a006940e5bc570e8dc02d9bf916d6fb44b2f Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Tue, 28 May 2024 22:06:36 -0400 Subject: [PATCH] Fix 1:6 --- .../docs/1-introduction/6-browser-utilities/answer.gjs | 9 +++++---- .../docs/1-introduction/6-browser-utilities/prompt.gjs | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) 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);