Skip to content

Commit 4bc5c0f

Browse files
committed
Use default parameter value where possible
Informed by: > lebab --replace . --transform default-param But I only selected the one case that seemed relevant.
1 parent bd84b0d commit 4bc5c0f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/prelude/types.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,8 +662,7 @@ var $sliceType = elem => {
662662
}
663663
return typ;
664664
};
665-
var $makeSlice = (typ, length, capacity) => {
666-
capacity = capacity || length;
665+
var $makeSlice = (typ, length, capacity = length) => {
667666
if (length < 0 || length > 2147483647) {
668667
$throwRuntimeError("makeslice: len out of range");
669668
}

0 commit comments

Comments
 (0)