Tweaked error message to provide more helpful info if shown

This commit is contained in:
Brian Vaughn committed 2019-01-30 14:39:37 -08:00
1 parent ca6151ca01
commit 6363fc0767
1 file changed
+1 -1
+1 -1
View File
@@ -57,7 +57,7 @@ export default class Store extends EventEmitter {
getElementAtIndex(index: number): Element {
if (index < 0 || index >= this.numElements) {
throw Error(`Invalid index ${index} specified`);
throw Error(`Invalid index ${index} specified; store contains ${this.numElements} items.`);
}
// Find wich root this element is in...