Duplicate declaration "value" error
Closed this issue · 2 comments
Sunil-tc commented
I'm getting the below error while building app,
error: bundling: TypeError: f8app/js/filter/FilterScreen.ios.js: Duplicate declaration "value"
toggleTopic(topic: string, value: boolean) {
const selectedTopics = { ...this.state.selectedTopics };
const value = !selectedTopics[topic];
if (value) {
selectedTopics[topic] = true;
} else {
armenbadalyan commented
Fixed by removing the second parameter of toggleTopic method.
toggleTopic(topic: string) {
const selectedTopics = { ...this.state.selectedTopics };
const value = !selectedTopics[topic];
if (value) {
selectedTopics[topic] = true;
} else {
delete selectedTopics[topic];
}
this.setState({ selectedTopics });
}
gengjiawen commented
This has been fixed via #190.