Describe the bug
Computed data doesn't seem to work for outputting an object or true (but oddly enough, false works fine). Instead, an error output.split is not a function is thrown
To Reproduce
eleventyComputed.js file in the global data directory.data => true. Note the error output.split is not a functiondata => ({}). Note the error output.split is not a functionExpected behavior
Expect to be able to set a computed property to either true or an object.
Environment:
Additional context
I expect this to work from the Advanced Details section.
Sorry about this! Some huge changes to computed data have happened recently but a beta hasn鈥檛 shipped with those yet. Can you retest with github master before I dive in deeper here?
My code is in a slightly broken state r/n, but a quick check off of master no longer throws the error I was seeing. I'll be able to check Monday if it's rendering as expected.
Thanks for the quick reply! Love computed data, an excellent addition to 11ty!
Ok! I've gone ahead and tested this and it is in fact _not_ rendering as expected, although this may be a different issue (and if it is I'm happy to open up a separate issue).
It _feels_ like computed data isn't hooked up to collections yet. Now that objects and true are valid output, I tried to actually build my output; part 1 was grabbing some content from a collection, only to find that the collections object is empty. Step 2 was to see if my computed data was available from a page in a collection, and found that my property wasn't added, and therefore not available, from an element in a collection.
This was all tested in master
Thanks for your patience here鈥攃an you retest with the latest master?
Huzzah! Thank you so much for the work on this! It does appear as if it's working as expected now! 馃榿
Yay! Really appreciate you testing鈥攖hanks! I鈥檒l ship a new beta shortly.