mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Don't run store migrations on renderer (#3968)
This commit is contained in:
1 parent
40835ae3a2
commit
0cd3931d67
3 files changed
+12
-4
No files matched your search
@@ -46,6 +46,10 @@ export abstract class BaseStore<T> extends Singleton {
|
||||
protected constructor(protected params: BaseStoreParams<T>) {
|
||||
super();
|
||||
makeObservable(this);
|
||||
|
||||
if (ipcRenderer) {
|
||||
params.migrations = undefined; // don't run migrations on renderer
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import { app } from "electron";
|
||||
import { app, ipcMain } from "electron";
|
||||
import semver from "semver";
|
||||
import { action, computed, observable, reaction, makeObservable } from "mobx";
|
||||
import { BaseStore } from "../base-store";
|
||||
@@ -48,7 +48,11 @@ export class UserStore extends BaseStore<UserStoreModel> /* implements UserStore
|
||||
});
|
||||
|
||||
makeObservable(this);
|
||||
fileNameMigration();
|
||||
|
||||
if (ipcMain) {
|
||||
fileNameMigration();
|
||||
}
|
||||
|
||||
this.load();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user