Skip to content

Commit e41a9c0

Browse files
Try to implement the delete method in Drive class in contents.ts.
1 parent 6a93195 commit e41a9c0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/contents.ts

+11
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,17 @@ export class Drive implements Contents.IDrive {
452452
throw err;
453453
}*/
454454

455+
const content: Array<Contents.IModel> = drive1Contents.content;
456+
457+
content.forEach(item => {
458+
if (item.path === localPath) {
459+
const index = content.indexOf(item);
460+
if (index !== -1) {
461+
content.splice(index, 1);
462+
}
463+
}
464+
});
465+
455466
this._fileChanged.emit({
456467
type: 'delete',
457468
oldValue: { path: localPath },

0 commit comments

Comments
 (0)