mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Tweaked error message to provide more helpful info if shown
This commit is contained in:
1 parent
ca6151ca01
commit
6363fc0767
1 file changed
+1
-1
@@ -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...
|
||||
|
||||
Reference in new issue
Block a user