ultimate-comparisons / ultimate-comparison-framework

The base of all ultimate-comparisons. Follow the README and create your own ultimate comparison.
http://ultimate-comparisons.github.io/ultimate-comparison-framework/
MIT License
16 stars 7 forks source link

Error when sorting Uncolored column #50

Closed chriba closed 7 years ago

chriba commented 7 years ago

current version: 176c5937 (2017-04-25)

When I try to sort the Uncolored column at the example page http://ultimate-comparisons.github.io/ultimate-comparison-BASE/ it throws an error.

TypeError: Cannot read property 'plain' of undefined

hueneburg commented 7 years ago

Ok, I've looked into it and it seems the problem is that the template does not have the Uncolored attribute. There are two ways to resolve this:

  1. All elements have to include all attributes
  2. It should be possible that some elements lack some attributes.

Depending on the wished behavior, I'll either add a feedback for the user for 1. or I'll try to implement that elements that lack the attribute that is currently sorted get pushed to the back.

If some other behavior is required, please tell me.

chriba commented 7 years ago

The second behavior is IMHO the better option.