From 30fa05f3c53fcad7b9b3f9fe905f72c322a83f77 Mon Sep 17 00:00:00 2001 From: Sam Kelleher Date: Mon, 29 May 2017 12:36:49 +0100 Subject: [PATCH] Switch default for simpler code. --- src/components/picker.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/picker.js b/src/components/picker.js index 32f0bfb..dc4214e 100644 --- a/src/components/picker.js +++ b/src/components/picker.js @@ -58,7 +58,7 @@ export default class Picker extends React.Component { allCategories.push(CUSTOM_CATEGORY) } - this.hideRecent = false + this.hideRecent = true if (props.include != undefined) { data.categories.sort((a, b) => { @@ -102,8 +102,8 @@ export default class Picker extends React.Component { let includeRecent = props.include && props.include.length ? props.include.indexOf('recent') > -1 : true let excludeRecent = props.exclude && props.exclude.length ? props.exclude.indexOf('recent') > -1 : false - if (!includeRecent && excludeRecent) { - this.hideRecent = true + if (includeRecent && !excludeRecent) { + this.hideRecent = false this.categories.unshift(RECENT_CATEGORY) }