Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update HasFunction method to discern between regular knots and function knots. #927

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

WolvenBard
Copy link

@WolvenBard WolvenBard commented Jan 2, 2025

Context:

For detailed information on the problem, please see the issue posted here:
#928

In short, the issue seems to be that Story.cs's method HasFunction doesn't discern between regular knots and function knots. It calls upon KnotContainerWithName to check if the container is there, but this doesn't distinguish function knots.

Solution:

Debugging and looking at the structure of a regular knot vs function knot Container object, the only difference I can note is that function knots contain a PopFunction command at the end of their contents. I've leveraged this for a (hacky) fix to check if the knot container retrieved is indeed a function.

If you know of a better way to do this, please make a suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant