Simplify getLast (#7267)

This commit is contained in:
fisker Cheung authored and Evilebot Tnawi committed 2020-01-22 17:30:25 +03:00
1 parent 5815e8de06
commit e7f3cfd684
1 file changed
+1 -3
+1 -3
View File
@@ -1,5 +1,3 @@
"use strict";
module.exports = function(arr) {
return arr.length > 0 ? arr[arr.length - 1] : null;
};
module.exports = arr => arr[arr.length - 1];