about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/components
diff options
context:
space:
mode:
authorkibigo! <marrus-sh@users.noreply.github.com>2018-01-03 12:36:21 -0800
committerkibigo! <marrus-sh@users.noreply.github.com>2018-01-04 18:33:13 -0800
commit42f50049ff29ccdc484c22f8a5a19cda2dd03a5b (patch)
tree5e04c0bc0106f634316202eb8dc2f8c356d1b556 /app/javascript/flavours/glitch/components
parentb4a3792201ccc01713b536e50428e027bd094d2b (diff)
WIP <Compose> Refactor; 1000 tiny edits
Diffstat (limited to 'app/javascript/flavours/glitch/components')
-rw-r--r--app/javascript/flavours/glitch/components/dropdown_menu.js5
-rw-r--r--app/javascript/flavours/glitch/components/link.js2
2 files changed, 4 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/components/dropdown_menu.js b/app/javascript/flavours/glitch/components/dropdown_menu.js
index 519941dd6..706390c92 100644
--- a/app/javascript/flavours/glitch/components/dropdown_menu.js
+++ b/app/javascript/flavours/glitch/components/dropdown_menu.js
@@ -134,11 +134,12 @@ export default class Dropdown extends React.PureComponent {
       this.props.onModalOpen({
         status,
         actions: items.map(
-          (item, i) => ({
+          (item, i) => item ? {
             ...item,
             name: `${item.text}-${i}`,
             onClick: this.handleItemClick.bind(i),
-          }),
+          } : null
+        ),
       });
 
       return;
diff --git a/app/javascript/flavours/glitch/components/link.js b/app/javascript/flavours/glitch/components/link.js
index c49fc487c..de99f7d42 100644
--- a/app/javascript/flavours/glitch/components/link.js
+++ b/app/javascript/flavours/glitch/components/link.js
@@ -45,7 +45,7 @@ export default class Link extends React.PureComponent {
       title,
       ...rest
     } = this.props;
-    const computedClass = classNames('link', className, role);
+    const computedClass = classNames('link', className, `role-${role}`);
 
     //  We assume that our `onClick` is a routing function and give it
     //  the qualities of a link even if no `href` is provided. However,