Skip to content

Commit

Permalink
Remove trailing extension name when importing JSON (qmk#720)
Browse files Browse the repository at this point in the history
- check for and remove trailing extension for JSON when importing keymap

Issue qmk#719
  • Loading branch information
yanfali authored Apr 25, 2020
1 parent e72ad32 commit 48c9bc9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/ControllerBottom.vue
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,11 @@ export default {
const msg = this.$t('statsTemplate', stats);
this.deferredMessage(msg);
this.viewReadme(this.keyboard).then(() => {
this.setKeymapName(data.keymap);
let keymapName = data.keymap;
if (keymapName.endsWith('.json')) {
keymapName = keymapName.replace(/.json$/, '');
}
this.setKeymapName(keymapName);
this.setDirty();
});
});
Expand Down

0 comments on commit 48c9bc9

Please sign in to comment.