Fix rm on .cct files (#880)

This commit is contained in:
TheAimMan 2023-10-23 05:19:49 -04:00 committed by GitHub
parent 445c0c3134
commit 5d266e01a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -202,7 +202,7 @@ export abstract class BaseServer implements IServer {
return { res: true };
}
if (path.endsWith(".cct")) {
const contractIndex = this.contracts.findIndex((program) => program);
const contractIndex = this.contracts.findIndex((contracts) => contracts.fn === path);
if (contractIndex === -1) return { res: false, msg: `Contract file ${path} does not exist` };
this.contracts.splice(contractIndex, 1);
return { res: true };