Closed ryanwelcher closed 5 months ago
@ryanwelcher I added the exclude_current
attribute to the useEffect
hook because I was encountering cases where I had selected the current id and then used the Exclude Current Post toggle and it will still be selected. While this worked, when I got back to the original state of the exclude_current attribute nothing would happen (toggle Off for example) that is why I added another variable to save the current value of the exclude_current
attribute.
Unfortunately, I never encountered any issues after I added this conditional during testing.
Thanks for the follow up @jenniferfarhat. The issue seemed to manifest with a fresh instance of AQL only (at least in my testing). For the time being, I've merged this to address the issue but if the issue that you're talking about manifests, we'll revisit this.
Thanks again for your contributions here :)
This PR fixes an issue that was introduced with #40 where a useState hook causing the block to crash in certain cases. The variable created for the state was not being used other than to set the state so I have removed it.
CC @jenniferfarhat, just wanted to be sure that I didn't miss anything with this PR