Skip to content

Commit

Permalink
fix(sources): convert previous assignment type saved as number to object
Browse files Browse the repository at this point in the history
  • Loading branch information
rhahao committed Apr 8, 2023
1 parent 2d4766a commit ff9ae85
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/classes/Source.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,22 @@ SourceClass.prototype.save = async function (srcData, localOverride) {
this.bibleReading_src[source_lang] = srcData.bibleReading_src;
this.bibleReading_study = srcData.bibleReading_study;
this.ayfCount = srcData.ayfCount;
if (typeof this.ass1_type === 'number') this.ass1_type = {};
this.ass1_type[source_lang] = srcData.ass1_type;
this.ass1_time = srcData.ass1_time;
this.ass1_study = srcData.ass1_study;
this.ass1_src[source_lang] = srcData.ass1_src;
if (typeof this.ass2_type === 'number') this.ass2_type = {};
this.ass2_type[source_lang] = srcData.ass2_type;
this.ass2_time = srcData.ass2_time;
this.ass2_study = srcData.ass2_study;
this.ass2_src[source_lang] = srcData.ass2_src;
if (typeof this.ass3_type === 'number') this.ass3_type = {};
this.ass3_type[source_lang] = srcData.ass3_type;
this.ass3_time = srcData.ass3_time;
this.ass3_study = srcData.ass3_study;
this.ass3_src[source_lang] = srcData.ass3_src;
if (typeof this.ass4_type === 'number') this.ass4_type = {};
this.ass4_type[source_lang] = srcData.ass4_type;
this.ass4_time = srcData.ass4_time;
this.ass4_study = srcData.ass4_study;
Expand Down

0 comments on commit ff9ae85

Please sign in to comment.