Skip to content

Commit

Permalink
fix: Ensure passed-in initial code overrides localStorage in REPL (#1167
Browse files Browse the repository at this point in the history
)
  • Loading branch information
rschristian authored Jul 17, 2024
1 parent 77476f2 commit 54bc153
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/controllers/repl/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import REPL_CSS from './examples/style.css?raw';
export function Repl({ code }) {
const { route } = useLocation();
const { query } = useRoute();
const [editorCode, setEditorCode] = useStoredValue('preact-www-repl-code', code);
const [editorCode, setEditorCode] = useStoredValue('preact-www-repl-code', code, true);
const [runnerCode, setRunnerCode] = useState(editorCode);
const [error, setError] = useState(null);
const [copied, setCopied] = useState(false);
Expand Down

0 comments on commit 54bc153

Please sign in to comment.