Skip to content

Commit

Permalink
don't migrate empty draft
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardoj committed Oct 20, 2023
1 parent d6504ca commit 2bb124b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libs/migrations/KeyReportActionsDraftByReportActionID.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ export default function () {

const newReportActionsDrafts = {};
_.each(allReportActionsDrafts, (reportActionDraft, onyxKey) => {
if (!_.isString(reportActionDraft)) {
newReportActionsDrafts[onyxKey] = null;
if (!_.isString(reportActionDraft) || _.isEmpty(reportActionDraft)) {
return;
}
newReportActionsDrafts[onyxKey] = null;

const reportActionID = onyxKey.split('_').pop();
const newOnyxKey = onyxKey.replace(`_${reportActionID}`, '');
Expand Down

0 comments on commit 2bb124b

Please sign in to comment.