Sefaria-Project icon indicating copy to clipboard operation
Sefaria-Project copied to clipboard

fix(Commentary Redirects): Ramban on Genesis, Introduction

Open stevekaplan123 opened this issue 5 months ago • 1 comments

Ramban on Genesis, Introduction should not redirect to Genesis, Introduction. Instead clicking on it from the TOC should send you to Ramban on Genesis, Introduction. I also caught a potential other bug whereby the parsedRef cache was being modified via the variable 'commRef' whereas the copy of the object 'commRef', 'commRefCopy' should be modified instead.

My reason for putting the check in isCommentaryRefWithBaseText because it will prevent any attempt to convert "Ramban on Genesis, Introduction" since openPanelAt directly calls isCommentaryRefWithBaseText to determine whether to convert the ref. I could've put this check in the actual conversion code (i.e. sefaria.js's convertCommentaryRefToBaseRef) and then had it fail but I think this would overly complicate the code.

stevekaplan123 avatar Mar 07 '24 16:03 stevekaplan123