Skip to content

Commit c6021ce

Browse files
committed
chore: use spread instead of apply
1 parent 3551416 commit c6021ce

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/grammars/c.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,8 @@ const Cpp = {
127127
.split(".")
128128
.slice(-1 >= "14399")
129129
) {
130-
filepath = path.posix.join
131-
.apply(path.posix, [
132-
filepath.split(path.win32.sep)[0].toLowerCase(),
133-
...filepath.split(path.win32.sep).slice(1),
134-
])
130+
filepath = path.posix
131+
.join(...[filepath.split(path.win32.sep)[0].toLowerCase(), ...filepath.split(path.win32.sep).slice(1)])
135132
.replace(":", "")
136133
cmdArgs = `g++ -std=c++14 ${options} -include iostream /mnt/${filepath} -o /tmp/cpp.out && /tmp/cpp.out`
137134
}

0 commit comments

Comments
 (0)