Sfoglia il codice sorgente

fix: Dashboard permissions now shows correctly, fixes #13201

Torkel Ödegaard 7 anni fa
parent
commit
9cfe2a7f5c

+ 2 - 1
public/app/features/dashboard/folder_picker/folder_picker.ts

@@ -131,6 +131,7 @@ export class FolderPickerCtrl {
   private loadInitialValue() {
     const resetFolder = { text: this.initialTitle, value: null };
     const rootFolder = { text: this.rootName, value: 0 };
+
     this.getOptions('').then(result => {
       let folder;
       if (this.initialFolderId) {
@@ -150,7 +151,7 @@ export class FolderPickerCtrl {
       this.folder = folder;
 
       // if this is not the same as our initial value notify parent
-      if (this.folder.id !== this.initialFolderId) {
+      if (this.folder.value !== this.initialFolderId) {
         this.onChange({ $folder: { id: this.folder.value, title: this.folder.text } });
       }
     });