Make Presets stateless

This commit is contained in:
Erik Johnston
2015-07-16 17:24:33 +01:00
parent aa1b763518
commit 68d60aadd1
4 changed files with 6 additions and 28 deletions

View File

@@ -62,10 +62,9 @@ module.exports = {
options.topic = this.state.topic;
}
var preset = this.getPreset();
if (preset) {
if (preset != PresetValues.Custom) {
options.preset = preset;
if (this.state.preset) {
if (this.state.preset != PresetValues.Custom) {
options.preset = this.state.preset;
} else {
options.initial_state = [
{