Skip to content

Commit

Permalink
Try to implement the delete method in Drive class in contents.ts.
Browse files Browse the repository at this point in the history
  • Loading branch information
HaudinFlorence committed Dec 11, 2023
1 parent 6a93195 commit e41a9c0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/contents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,17 @@ export class Drive implements Contents.IDrive {
throw err;
}*/

const content: Array<Contents.IModel> = drive1Contents.content;

content.forEach(item => {
if (item.path === localPath) {
const index = content.indexOf(item);
if (index !== -1) {
content.splice(index, 1);
}
}
});

this._fileChanged.emit({
type: 'delete',
oldValue: { path: localPath },
Expand Down

0 comments on commit e41a9c0

Please sign in to comment.