]> Untitled Git - lemmy.git/commitdiff
ui.components.sort-select: always parse to number
authorderek <wwsage@gmail.com>
Mon, 13 Jul 2020 04:55:26 +0000 (00:55 -0400)
committerderek <wwsage@gmail.com>
Tue, 14 Jul 2020 00:14:01 +0000 (20:14 -0400)
ui/src/components/sort-select.tsx

index 22942d1bb07b8bbbedc08b31775d6546a2cc4233..736cbb30ff4060850f61dd04de5faf7836688e33 100644 (file)
@@ -24,8 +24,9 @@ export class SortSelect extends Component<SortSelectProps, SortSelectState> {
   }
 
   static getDerivedStateFromProps(props) {
+    console.log('sort-select', props);
     return {
-      sort: props.sort,
+      sort: Number(props.sort),
     };
   }