From ed2e65fb8a61c30bea284708b7aef556ac6821c9 Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Sun, 30 Aug 2020 16:15:36 -0400 Subject: [PATCH] Fix expand() on passage cards --- src/.vscode/launch.json | 15 +++++++++++++++ src/src/app/services/app.service.ts | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 src/.vscode/launch.json diff --git a/src/.vscode/launch.json b/src/.vscode/launch.json new file mode 100644 index 00000000..aeffbc56 --- /dev/null +++ b/src/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "chrome", + "request": "launch", + "name": "Launch Chrome against localhost", + "url": "http://localhost:4200", + "webRoot": "${workspaceFolder}/src/" + } + ] +} diff --git a/src/src/app/services/app.service.ts b/src/src/app/services/app.service.ts index 95a2fc7e..1aac0e1f 100644 --- a/src/src/app/services/app.service.ts +++ b/src/src/app/services/app.service.ts @@ -361,7 +361,7 @@ export class AppService extends createStateService(reducer, initialState) { async updatePassage(oldCard: CardItem, ref: BibleReference) { const newCard = await this.composeBiblePassageCardItem(ref); - this.dispatch(AppActionFactory.newUpdateCard(oldCard, newCard)); + this.dispatch(AppActionFactory.newUpdateCard(newCard, oldCard)); } private async composeBiblePassageCardItem(ref: BibleReference) {