Skip to content

Commit

Permalink
Improve examples loader
Browse files Browse the repository at this point in the history
- don't use deprecated substr
- default to simple movement example
  • Loading branch information
brianchirls committed Jul 31, 2022
1 parent 97721b6 commit 277d818
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function selectExample(key) {

// select initial example from URL hash
function loadExampleFromHash() {
const key = window.location.hash.substr(1);
const key = window.location.hash.substring(1) || 'simple';
const ex = key && findExample(key) || null;
if (ex) {
iframe.src = `../examples/${key}.html`;
Expand Down

0 comments on commit 277d818

Please sign in to comment.