Skip to content

Commit

Permalink
Fix custom icon handling when configuring custom directory AND sub-fo…
Browse files Browse the repository at this point in the history
…lder.
  • Loading branch information
jesseleite committed Nov 13, 2023
1 parent b1c74c4 commit b44b6ba
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion resources/js/components/SvgIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,16 @@ export default {
customIcon() {
if (! this.directory) return;
return data_get(this.$config.get('customSvgIcons') || {}, `${this.directory}.${this.name}`);
let directory = this.directory;
let folder = null;
let file = this.name;
if (this.name.includes('/')) {
[folder, file] = this.name.split('/');
directory = directory+'/'+folder;
}
return data_get(this.$config.get('customSvgIcons') || {}, `${directory}.${file}`);
},
},
Expand Down

0 comments on commit b44b6ba

Please sign in to comment.