Skip to content

Commit 04af8f9

Browse files
committed
Updated Includes Method
1 parent 3ffffcd commit 04af8f9

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

structures/methods/includes.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ module.exports = async function(table, key, value){
77
if(!key) throw new TypeError(errors.key.replace("{received}", key));
88
if(value == null) throw new TypeError(errors.value.replace("{received}", value));
99

10-
let res = false;
1110
let data = await this.get(table, key) || [];
1211
if(!Array.isArray(data)) throw new TypeError(errors.array.replace("{key}", key));
13-
if(data.includes(value)){
14-
res = true;
15-
}
16-
return res;
12+
return data.includes(value);
1713
}

0 commit comments

Comments
 (0)