Skip to content

Commit e265323

Browse files
committed
document unpin bug
1 parent 2b642f2 commit e265323

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

gui/app/components/document/document-toolbar.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@ export default Ember.Component.extend(TooltipMixin, NotifierMixin, {
4242
this.set('saveTemplate.name', this.get('document.name'));
4343
this.set('saveTemplate.description', this.get('document.excerpt'));
4444

45-
this.set('pinState.pinId', this.get('pinned').isDocumentPinned(this.get('document.id')));
46-
this.set('pinState.isPinned', this.get('pinState.pinId') !== '');
45+
this.get('pinned').isDocumentPinned(this.get('document.id')).then( (pinId) => {
46+
this.set('pinState.pinId', pinId);
47+
this.set('pinState.isPinned', pinId !== '');
48+
});
49+
4750
this.set('pinState.newName', this.get('document.name'));
4851
},
4952

0 commit comments

Comments
 (0)