Replies: 1 comment
-
I solved half of the issue, but not the other half, so I'd still appreciate understanding what's going on. I had defined |
Beta Was this translation helpful? Give feedback.
-
I solved half of the issue, but not the other half, so I'd still appreciate understanding what's going on. I had defined |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a constant
wordsFiltered
that's an array of objects, which adjusts itself based on choices in some selectors. I'm trying to pull out some of the properties into a new constant.If I just do
wordsFiltered[0].directIntertextIDs
in its own cell, it works fine, both when the page is first refreshed and when I make selections and subsequent selections in the selectors.However, if I do:
then I start having issues (calling
passsageIntxts
in its own cell).On page refresh, and when I make an initial selection in my selectors, something causes
word.directIntertextsIDs
to beundefined
just inpassageIntxts
. When I make a change in the selectors that causeswordsFiltered
to change without being temporarily empty, then it works. Then ifwordsFiltered
is ever temporarily empty again, based on other selections, it goes back to beingundefined
withinpassageIntxts
until I make another change, even thoughwordsFiltered
is itself not actually empty.I can give you the code that's producing
wordsFiltered
, but I don't think that's the issue, because it works to just access it directly. I've tried this in a thousand different ways, including even trying to write this as a function in case that works, but it's the same problem (or worse, sometimes).Thanks in advance for any help!
ETA: I tried pushing first the whole object and then just the object property, in order, to see what would happen, and here's what I get -- as you can see, it thinks the property
directIntertextIDs
(array index 1) doesn't exist, even though it's obviously there in the object (array index 0):The code for this is:
So something really isn't making a whole lot of sense.
Beta Was this translation helpful? Give feedback.
All reactions