fix: Improved handling of delete events from collection and document sockets (#1517)
* handle delete events fron collection and document sockets * handle collection deletes to documents * rework semantics to always reload after a delete Co-authored-by: Tom Moor <tom.moor@gmail.com>
This commit is contained in:
@@ -50,7 +50,8 @@ class DataLoader extends React.Component<Props> {
|
||||
// reload from the server otherwise the UI will not know which authorizations
|
||||
// the user has
|
||||
if (this.document) {
|
||||
const policy = this.props.policies.get(this.document.id);
|
||||
const document = this.document;
|
||||
const policy = this.props.policies.get(document.id);
|
||||
|
||||
if (!policy && !this.error) {
|
||||
this.loadDocument();
|
||||
|
||||
Reference in New Issue
Block a user