For a footer script, I’d like to check if a property exists in the current page, and if so, set a variable accordingly. I thought the following would work, but the variable ‘fat’ doesn’t get defined whether or not the property ‘fat’ exists in the note:
if ( dv.current().fat ) { let fat = dv.current().fat + 'g' } else { let fat = '' };
I tried checking if dv.current().fat == null, checking for dv.current().fat.length, no luck. Seems like it should be easy, but my searches of the forum and the Reddit channel have produced nothing. Help!