amazon-archives / web-app-starter-kit-for-fire-tv

Web App Starter Kit Examples
https://amzn.github.io/web-app-starter-kit-for-fire-tv/
Other
372 stars 161 forks source link

MRSS demo has category duplicates #60

Open yanniboi opened 5 years ago

yanniboi commented 5 years ago

image

By default the MRSS demo fails to deduplicate the categories. There is a line that is supposed to handle this but it fails:

$.unique(cats); // purge duplicates.

It seems that $.unique() only removes duplicates that immediately follow each other in an array.

['foo', 'bar', 'bar', 'baz'] becomes ['foo', 'bar', 'baz']

but ['foo', 'bar', 'baz', 'bar'] stays ['foo', 'bar', 'baz', 'bar']

yanniboi commented 5 years ago

After the sort the categories look as follows:

image