Fix Number cast in Network plugin

Summary:
Getting the error
```
$ /mnt/btrfs/trunk-hg-fb4a-fbsource-86184178-1580774714/xplat/sonar/node_modules/.bin/tsc --noemit
src/plugins/network/index.tsx(180,59): error TS2349: This expression is not callable.
  Type 'Number' has no call signatures.
  error Command failed with exit code 1.
```

EDIT: This error was a red herring from another commit I was based on. Either way, `Number` is discouraged by the Typescript standard (https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html), so let's move these to `number` instead.

Reviewed By: mweststrate

Differential Revision: D19712113

fbshipit-source-id: b754780063a1c429724abcd343da06514671bc83
This commit is contained in:
Jonathan Thomas
2020-02-05 06:58:12 -08:00
committed by Facebook Github Bot
parent d9c8b5dd64
commit 1e11d63ba8

View File

@@ -397,7 +397,8 @@ function calculateState(
}
rows.sort(
(a: TableBodyRow, b: TableBodyRow) => Number(a.sortKey) - Number(b.sortKey),
(a: TableBodyRow, b: TableBodyRow) =>
(a.sortKey as number) - (b.sortKey as number),
);
return {