We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d0793a commit f4bb5d4Copy full SHA for f4bb5d4
packages/app/src/app/pages/Sandbox/index.js
@@ -45,7 +45,15 @@ class SandboxPage extends React.Component {
45
}
46
47
fetchSandbox = () => {
48
- const id = this.props.match.params.id;
+ let id = this.props.match.params.id;
49
+
50
+ // If the id is in the form of "slugified-title-shortid" we can take the last
51
+ // shortid and get the data with that. This solves the problem with urls becoming
52
+ // invalid after giving a sandbox a new title.
53
+ const split = id.split('-');
54
+ if (!id.startsWith('github') && split.length > 1) {
55
+ id = split.pop();
56
+ }
57
58
this.props.signals.editor.sandboxChanged({ id });
59
};
0 commit comments