瀏覽代碼

Merge branch 'main' into release-v1.6.54

Abhinav 1 年之前
父節點
當前提交
d48dae37e7
共有 2 個文件被更改,包括 9 次插入0 次删除
  1. 7 0
      .husky/pre-commit
  2. 2 0
      src/api/electronStore.ts

+ 7 - 0
.husky/pre-commit

@@ -1,4 +1,11 @@
 #!/bin/sh
 #!/bin/sh
 . "$(dirname "$0")/_/husky.sh"
 . "$(dirname "$0")/_/husky.sh"
 
 
+branch="$(git rev-parse --abbrev-ref HEAD)"
+
+if [ "$branch" = "main" ]; then
+  echo "You can't commit directly to main branch"
+  exit 1
+fi
+
 npx lint-staged
 npx lint-staged

+ 2 - 0
src/api/electronStore.ts

@@ -3,12 +3,14 @@ import { safeStorageStore } from '../stores/safeStorage.store';
 import { uploadStatusStore } from '../stores/upload.store';
 import { uploadStatusStore } from '../stores/upload.store';
 import { logError } from '../services/logging';
 import { logError } from '../services/logging';
 import { userPreferencesStore } from '../stores/userPreferences.store';
 import { userPreferencesStore } from '../stores/userPreferences.store';
+import { watchStore } from '../stores/watch.store';
 
 
 export const clearElectronStore = () => {
 export const clearElectronStore = () => {
     try {
     try {
         uploadStatusStore.clear();
         uploadStatusStore.clear();
         keysStore.clear();
         keysStore.clear();
         safeStorageStore.clear();
         safeStorageStore.clear();
+        watchStore.clear();
         userPreferencesStore.delete('optOutOfCrashReports');
         userPreferencesStore.delete('optOutOfCrashReports');
     } catch (e) {
     } catch (e) {
         logError(e, 'error while clearing electron store');
         logError(e, 'error while clearing electron store');