Skip to content

Commit

Permalink
Merge pull request #473 from tidalcycles/fix-hashes
Browse files Browse the repository at this point in the history
fix: hash links
  • Loading branch information
felixroos committed Feb 22, 2023
2 parents f349e36 + 4c5d6f1 commit c8f8f02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion website/src/repl/Repl.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export function Repl({ embedded = false }) {
afterEval: ({ code }) => {
setPending(false);
setLatestCode(code);
window.location.hash = '#' + encodeURIComponent(btoa(code));
},
onToggle: (play) => !play && cleanupDraw(false),
drawContext,
Expand All @@ -145,7 +146,7 @@ export function Repl({ embedded = false }) {
} Press play or hit ctrl+enter to run it!`,
'highlight',
);
setCode(latestCode || decoded || randomTune);
setCode(decoded || latestCode || randomTune);
});
}, []);

Expand Down

0 comments on commit c8f8f02

Please sign in to comment.