Closed lyonsquark closed 1 year ago
The Living Greengrass blog link need the date of the daf. I'm getting the wrong dates and so the link doesn't work.
This happens because of https://github.com/lyonsquark/obsidian-daf-yomi/blob/b0b4390ef71dde10f619b8b52943d818709d7378/main.ts#L306
That alters the original object, so that subsequent calls to the dateForDafForLGG function return the wrong answer.
dateForDafForLGG
The solution is to do
let dafDate = daf.startDate.clone().add(inPage-1, 'days');
The clone() will copy the object so the subsequent add will not alter the original.
clone()
add
The Living Greengrass blog link need the date of the daf. I'm getting the wrong dates and so the link doesn't work.
This happens because of https://github.com/lyonsquark/obsidian-daf-yomi/blob/b0b4390ef71dde10f619b8b52943d818709d7378/main.ts#L306
That alters the original object, so that subsequent calls to the
dateForDafForLGG
function return the wrong answer.The solution is to do
The
clone()
will copy the object so the subsequentadd
will not alter the original.