]> cat aescling's git repositories - mastodon.git/commitdiff
Do not cause an error if domain_lists.blocks.next is undefined (#8021)
authorThibG <thib@sitedethib.com>
Sat, 14 Jul 2018 21:28:29 +0000 (23:28 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Sat, 14 Jul 2018 21:28:29 +0000 (23:28 +0200)
A valid URL is always truthy, so we can simplify this check

app/javascript/mastodon/actions/domain_blocks.js

index 47e2df76ba5cc914b35eb33259a2f14b2fe5a323..0445a5e10c6f72753935cdf2fa4fbed3f4650fd7 100644 (file)
@@ -128,7 +128,7 @@ export function expandDomainBlocks() {
   return (dispatch, getState) => {
     const url = getState().getIn(['domain_lists', 'blocks', 'next']);
 
-    if (url === null) {
+    if (!url) {
       return;
     }