From 2849cce07792d31c530b512a54268596d387d07f Mon Sep 17 00:00:00 2001 From: Drew Regitsky Date: Mon, 11 Jan 2016 15:28:31 -0800 Subject: [PATCH] fix(templates): fix two bugs breaking templates plugin rename and search --- internal_packages/composer-templates/lib/template-picker.jsx | 2 +- internal_packages/composer-templates/lib/template-store.es6 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal_packages/composer-templates/lib/template-picker.jsx b/internal_packages/composer-templates/lib/template-picker.jsx index 1e48eed39..e8e2c7d4f 100644 --- a/internal_packages/composer-templates/lib/template-picker.jsx +++ b/internal_packages/composer-templates/lib/template-picker.jsx @@ -43,7 +43,7 @@ class TemplatePicker extends React.Component { }); } - _onSearchValueChange() { + _onSearchValueChange = () => { const newSearch = event.target.value; return this.setState({ searchValue: newSearch, diff --git a/internal_packages/composer-templates/lib/template-store.es6 b/internal_packages/composer-templates/lib/template-store.es6 index 2a8acc5b0..fa56107d0 100644 --- a/internal_packages/composer-templates/lib/template-store.es6 +++ b/internal_packages/composer-templates/lib/template-store.es6 @@ -163,7 +163,7 @@ class TemplateStore extends NylasStore { _getTemplate(name, id) { for (const template of this._items) { - if ((template.name === name || name === null) && (template.id === id || id === null)) { + if ((template.name === name || name == null) && (template.id === id || id == null)) { return template; } }