Skip to content

Commit 85dcb57

Browse files
committedJan 29, 2019
toNullable accepts undefined, no need to check
1 parent 355f17e commit 85dcb57

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎src/Data/ArrayBuffer/Typed.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,12 @@ exports.reduceRight1Impl = function reduceRight1Impl (a,f) {
108108
};
109109

110110
exports.findImpl = function findImpl (a,f) {
111-
var x = a.find(f);
112-
return (x === undefined) ? null : x;
111+
return a.find(f);
113112
};
113+
114114
exports.findIndexImpl = function findIndexImpl (a,f) {
115-
var x = a.findIndex(f);
116-
return (x === -1) ? null : x;
115+
var r = a.findIndex(f);
116+
return r === -1 ? null : r;
117117
};
118118
exports.indexOfImpl = function indexOfImpl (a,x,mo) {
119119
var r = mo === null ? a.indexOf(x) : a.indexOf(x,mo);

0 commit comments

Comments
 (0)