Chrome Developer Tools Invoke Property Getter
问题 All of my property values require me to click them in order to see them. How can I fix this? The object I'm trying to view is this Query Object. It seems to do this with most Arcgis objects I'm trying to view. 回答1: The issue is, calling a getter can have side effects e.g. class Dog { get paws() { console.log('paws!'); //side effect this.paws++; // side effect if(this.paws > 4) { throw Error('oh no'); // side effect } return this.paws; } } Every getter can alter the state of the app or break