@mixd-id/web-scaffold 0.1.240411040 → 0.1.240411041

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mixd-id/web-scaffold",
3
3
  "private": false,
4
- "version": "0.1.240411040",
4
+ "version": "0.1.240411041",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
@@ -423,15 +423,19 @@ export default{
423
423
  async loadPreset(){
424
424
  if(!Object.keys(this.$route.query).map(_ => _.toLowerCase()).includes('reset')){
425
425
  if(this.presetKey){
426
- return this.socket.send(this.presetSrc, { key:this.presetKey })
427
- .then(config => {
428
- if(config){
429
- Object.assign(this.cConfig, config)
426
+ const config = await this.socket.send(this.presetSrc, { key:this.presetKey })
427
+ if(config){
428
+ if((config.presets ?? []).length > 0){
429
+ Object.assign(this.cConfig, config)
430
+ }
431
+ else{
432
+ const defaultConfig = setupConfig(await this.defaultConfig())
433
+ Object.assign(this.cConfig, defaultConfig)
434
+ }
430
435
 
431
- if(this.$route.query?.search)
432
- this.preset.search = this.$route.query.search
433
- }
434
- })
436
+ if(this.$route.query?.search)
437
+ this.preset.search = this.$route.query.search
438
+ }
435
439
  }
436
440
  else{
437
441
  const defaultConfig = setupConfig(await this.defaultConfig())