Explorar o código

fix: clear items list before fetching permissions list

Torkel Ödegaard %!s(int64=8) %!d(string=hai) anos
pai
achega
c01b80522e
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      public/app/stores/PermissionsStore/PermissionsStore.ts

+ 2 - 0
public/app/stores/PermissionsStore/PermissionsStore.ts

@@ -108,6 +108,8 @@ export const PermissionsStore = types
         self.isFolder = isFolder;
         self.isInRoot = isInRoot;
         self.dashboardId = dashboardId;
+        self.items.clear();
+
         const res = yield backendSrv.get(`/api/dashboards/id/${dashboardId}/acl`);
         const items = prepareServerResponse(res, dashboardId, isFolder, isInRoot);
         self.items = items;