Remove some spot.js dependencies

This commit is contained in:
2026-04-25 15:49:58 +02:00
parent 90349365f9
commit b2b06180e6
4 changed files with 29 additions and 20 deletions

View File

@@ -78,7 +78,7 @@ export default {
return {page: sPage, items: asHash};
},
setHash(sPage = '', asItems = []) {
if(typeof asItems == 'string') asItems = [asItems];
if(typeof asItems == 'string' && asItems != '') asItems = [asItems];
const sItems = (asItems.length > 0)?(this.spot.consts.hash_sep + asItems.join(this.spot.consts.hash_sep)):'';
window.location.hash = '#' + sPage + sItems;
}