Open paulrobertlloyd opened 5 years ago
Updating the following on line 74 fixes this issue:
- var name = getValue( prop.name );
+ var name = prop.name ? getValue( prop.name ) : undefined;
Happy to make a PR if you feel this is the right approach.
Thanks for reporting the issues @paulrobertlloyd 🙂The approach looks correct, I'd be happy to merge a PR.
Do you have an example of when this happens? I tried a note from your website and it seems to contain the name: https://glennjones.net/tools/microformats/?url=https%3A%2F%2Fpaulrobertlloyd.com%2Fnotes%2F1563227099&callback=&dateformat=auto
I'd like to add it to the test suite so that there aren't any regressions in the future.
This package currently throws an error (shown below) if the provided mf2 object doesn’t include a
name
property, which is often the case for note type posts.