Skip to content

Commit f7fc383

Browse files
committed
refactor: iterate object values by lodash/values
1 parent b616e72 commit f7fc383

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/connection.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import d from 'debug';
2+
import values from 'lodash/values';
23
import WebSocketPlus, {
34
OPEN,
45
DISCONNECT,
@@ -59,7 +60,7 @@ export default class Connection extends WebSocketPlus {
5960
if (waitingForRespond) {
6061
if (isIdempotentCommand(command)) {
6162
buffer = command.toArrayBuffer();
62-
const duplicatedCommand = Object.values(this._commands).find(
63+
const duplicatedCommand = values(this._commands).find(
6364
({ buffer: targetBuffer, command: targetCommand }) =>
6465
targetCommand.cmd === command.cmd &&
6566
targetCommand.op === command.op &&

0 commit comments

Comments
 (0)