Skip to content
This repository was archived by the owner on May 17, 2021. It is now read-only.

Commit 14c95de

Browse files
authored
Add check for readonly before drop event (#129)
1 parent 433ead1 commit 14c95de

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/components/sidebar-collection/sidebar-collection.jsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ class SidebarCollection extends PureComponent {
3131
* Handle drop collection.
3232
*/
3333
onDrop = () => {
34-
const databaseName = this.props.database;
35-
const collectionName = this.getCollectionName();
36-
this.props.globalAppRegistryEmit('open-drop-collection', databaseName, collectionName);
34+
if (!this.isNotWritable()) {
35+
const databaseName = this.props.database;
36+
const collectionName = this.getCollectionName();
37+
this.props.globalAppRegistryEmit('open-drop-collection', databaseName, collectionName);
38+
}
3739
}
3840

3941
/**

0 commit comments

Comments
 (0)