twinejs
twinejs copied to clipboard
Fix replace dialogue deleting passage names
Resolves #745
Description
Fix replace dialogue deleting passage names
Issues fixed
#745
Credit
Please put an X in one of the squares below only.
[ ] I would like to be credited in the application as: SimonHeimberg
[x] I would not like my name to appear in the application credits.
Presubmission checklist
Put an X in the squares below to indicate you've done each step.
[x] I have read this project's CONTRIBUTING file and this PR follows the criteria laid out there.
[x] This contribution was created by me and I have the right to submit it under the GPL v3 license. (This is not a rights assignment.)
[x] I have read and agree to abide by this project's Code of Conduct.
I did not test my change because I do not have set up what it would need. So only a short explication why I think it should work: The const "name" is set in line 50. https://github.com/klembot/twinejs/blob/178a70a76a067241dfe88ecfb7f72a4203d6c6de/src/dialogs/story-search/result.js#L50 It is undefined when the name shall not get replaced. It is used unconditionally on line 64. https://github.com/klembot/twinejs/blob/178a70a76a067241dfe88ecfb7f72a4203d6c6de/src/dialogs/story-search/result.js#L64 And here it probably sets the name in all (or too many) cases.
As with your other PR--again, I'm very sorry for letting this PR sit so long. I believe this is not an issue as of version 2.4, but if it is, let's re-open the issue you linked.