From 954ef4ce89e29f5c12c95b99e876ed2182048fcb Mon Sep 17 00:00:00 2001 From: Juan Tejada Date: Tue, 5 Apr 2016 11:28:08 -0700 Subject: [PATCH] fix(prefs): Fix `this` binding in mail rules prefs page --- .../preferences/lib/tabs/preferences-mail-rules.jsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/internal_packages/preferences/lib/tabs/preferences-mail-rules.jsx b/internal_packages/preferences/lib/tabs/preferences-mail-rules.jsx index b643d13f7..c6ef4cf75 100644 --- a/internal_packages/preferences/lib/tabs/preferences-mail-rules.jsx +++ b/internal_packages/preferences/lib/tabs/preferences-mail-rules.jsx @@ -14,8 +14,10 @@ import {Flexbox, ScrollRegion, ScenarioEditor} from 'nylas-component-kit'; -const {ActionTemplatesForAccount, - ConditionTemplatesForAccount} = MailRulesTemplates; +const { + ActionTemplatesForAccount, + ConditionTemplatesForAccount, +} = MailRulesTemplates; class PreferencesMailRules extends React.Component { @@ -65,7 +67,7 @@ class PreferencesMailRules extends React.Component { }); } - _onReprocessRules() { + _onReprocessRules = () => { const needsMessageBodies = () => { for (const rule of this.state.rules) { for (const condition of rule.conditions) {