bustle / mobiledoc-kit

A toolkit for building WYSIWYG editors with Mobiledoc
https://bustle.github.io/mobiledoc-kit/demo/
MIT License
1.55k stars 151 forks source link

Assertion message is bad when card is missing method #606

Closed lukemelia closed 2 years ago

lukemelia commented 6 years ago

In a failure scenario, the method variable is being set to undefined and then interpolated as part of the assertion error message: https://github.com/bustle/mobiledoc-kit/blob/master/src/js/models/card-node.js#L24-L28

gpoitch commented 2 years ago

The assert is now outputting:

Card "my-card" must define `render` method