Sefaria-Project
Sefaria-Project copied to clipboard
fix(Commentary Redirects): Ramban on Genesis, Introduction
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.
This pull request has been linked to Shortcut Story #21614: When opening a commentary in the reader, open it in the context of its parent text..