Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(plugin-helper): avoid some malformed attributes in attrsToString (#…
…26) * attrsToString: To avoid some malformed attributes Error: ``` TypeError: Cannot convert undefined or null to object at Function.keys (<anonymous>) at attrsToString ``` This errors appears if no `attrs` setted in custom tag: ``` const BBcodePresetTemp = BbobPresetHTML5.extend((tags: any) => { tags.br = () => ({ tag: 'br', // attrs: {}, // <-- Comment this line for error and add [br] to text content: null, }); return tags; }); ```
- Loading branch information