Skip to content

Commit 0b46de9

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

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/contents.ts

+12
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,18 @@ 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+
console.log('item:', item);
460+
const index = content.indexOf(item);
461+
if (index !== -1) {
462+
content.splice(index, 1);
463+
}
464+
}
465+
});
466+
455467
this._fileChanged.emit({
456468
type: 'delete',
457469
oldValue: { path: localPath },

0 commit comments

Comments
 (0)