Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Commit

Permalink
fix: "0ms" latency was ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
tyn1998 committed Aug 18, 2022
1 parent db03c88 commit 947e7ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ui/MessagesView/MessagesView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const MessagesView = () => {
send: 0, // the unit is bytes/s
receive: 0,
});
const [latency, setLatency] = useState();
const [latency, setLatency] = useState(null);
const [isCompact, setIsCompact] = useState(false);

const timer = useRef(null);
Expand Down
2 changes: 1 addition & 1 deletion src/ui/MessagesView/NetLatencyView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import './NetLatencyView.scss';
const NetLatencyView = ({ capturing, latency }) => {
if (!capturing) return null;

if (!latency) {
if (latency === null) {
latency = '-·-';
} else if (latency > 999) {
latency = '999+';
Expand Down

0 comments on commit 947e7ef

Please sign in to comment.