Fix errors in Updater

This commit is contained in:
Robbie Antenesse 2017-08-20 12:31:04 -06:00
parent ebd4045503
commit 3dadcb0ee1
2 changed files with 3 additions and 3 deletions

View File

@ -110,7 +110,7 @@ export class EditDictionaryModal extends Component {
.map((value) => { return value.trim() }); .map((value) => { return value.trim() });
} }
console.log(updatedDetails); // console.log(updatedDetails);
this.props.updater.updateDictionaryDetails(updatedDetails) this.props.updater.updateDictionaryDetails(updatedDetails)
.then(() => { .then(() => {

View File

@ -33,7 +33,7 @@ export class Updater {
if (dicitonaryDetails.specification) { if (dicitonaryDetails.specification) {
updatedDetails['specification'] = dicitonaryDetails.specification; updatedDetails['specification'] = dicitonaryDetails.specification;
this.dicitonary.specification = dicitonaryDetails.specification; this.dictionary.specification = dicitonaryDetails.specification;
} }
if (dicitonaryDetails.description) { if (dicitonaryDetails.description) {
@ -46,7 +46,7 @@ export class Updater {
this.dictionary.partsOfSpeech = dicitonaryDetails.partsOfSpeech; this.dictionary.partsOfSpeech = dicitonaryDetails.partsOfSpeech;
} }
if (helper.objectIsEmpty(updatedDetails)) { if (updatedDetails.isEmpty()) {
reject('No dictionary details have changed.'); reject('No dictionary details have changed.');
} else { } else {
this.app.setState(updatedDetails, () => { this.app.setState(updatedDetails, () => {