Skip to content

Commit

Permalink
fix: handling of existing templates
Browse files Browse the repository at this point in the history
  • Loading branch information
iocanel committed Jan 16, 2023
1 parent b141433 commit e411a62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/actions/org.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,8 @@ export const insertPendingCapture = () => (dispatch, getState) => {
)}${captureContent}${substitutedTemplate.substring(initialCursorIndex)}`
: `${substitutedTemplate}${captureContent}`;

dispatch(insertCapture(template.get('id'), content, template.get('shouldPrepend'), template.get('shouldCaptureAsNewHeader')));
dispatch(insertCapture(template.get('id'), content, template.get('shouldPrepend'),
!template.has('shouldCaptureAsNewHeader') || template.get('shouldCaptureAsNewHeader')));
dispatch(sync({ successMessage: 'Item captured' }));
};

Expand Down

0 comments on commit e411a62

Please sign in to comment.