fix(core): update
This commit is contained in:
		@@ -3,6 +3,6 @@
 | 
			
		||||
 */
 | 
			
		||||
export const commitinfo = {
 | 
			
		||||
  name: '@push.rocks/smartdata',
 | 
			
		||||
  version: '5.0.37',
 | 
			
		||||
  version: '5.0.38',
 | 
			
		||||
  description: 'do more with data'
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -37,7 +37,16 @@ export class EasyStore<T> {
 | 
			
		||||
    this.nameId = nameIdArg;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  private async getEasyStore() {
 | 
			
		||||
  private easyStorePromise: Promise<InstanceType<typeof this.easyStoreClass>>;
 | 
			
		||||
  private async getEasyStore(): Promise<InstanceType<typeof this.easyStoreClass>> {
 | 
			
		||||
    if (this.easyStorePromise) {
 | 
			
		||||
      return this.easyStorePromise;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    // first run from here
 | 
			
		||||
    const deferred = plugins.smartpromise.defer<InstanceType<typeof this.easyStoreClass>>();
 | 
			
		||||
    this.easyStorePromise = deferred.promise;
 | 
			
		||||
 | 
			
		||||
    let easyStore = await this.easyStoreClass.getInstance({
 | 
			
		||||
      nameId: this.nameId,
 | 
			
		||||
    });
 | 
			
		||||
@@ -48,7 +57,8 @@ export class EasyStore<T> {
 | 
			
		||||
      easyStore.data = {};
 | 
			
		||||
      await easyStore.save();
 | 
			
		||||
    }
 | 
			
		||||
    return easyStore;
 | 
			
		||||
    deferred.resolve(easyStore);
 | 
			
		||||
    return this.easyStorePromise;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user