Switch default for simpler code.
parent
32a5206453
commit
30fa05f3c5
|
@ -58,7 +58,7 @@ export default class Picker extends React.Component {
|
||||||
allCategories.push(CUSTOM_CATEGORY)
|
allCategories.push(CUSTOM_CATEGORY)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.hideRecent = false
|
this.hideRecent = true
|
||||||
|
|
||||||
if (props.include != undefined) {
|
if (props.include != undefined) {
|
||||||
data.categories.sort((a, b) => {
|
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 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
|
let excludeRecent = props.exclude && props.exclude.length ? props.exclude.indexOf('recent') > -1 : false
|
||||||
if (!includeRecent && excludeRecent) {
|
if (includeRecent && !excludeRecent) {
|
||||||
this.hideRecent = true
|
this.hideRecent = false
|
||||||
this.categories.unshift(RECENT_CATEGORY)
|
this.categories.unshift(RECENT_CATEGORY)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue