Add undefined check for computed properties
Same as obervers, in polymer 2 a computed property will run when at least one dependencies is defined. To match the behavior in v1, return undefined if not all dependencies are defined. Bug: Issue 10723 Change-Id: Iaa294d5bc392c6f3970cdbb59213a9d2913e6f64
This commit is contained in:
		@@ -133,6 +133,11 @@
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    _computeDescriptionReadOnly(loggedIn, change, account) {
 | 
			
		||||
      // Polymer 2: check for undefined
 | 
			
		||||
      if ([loggedIn, change, account].some(arg => arg === undefined)) {
 | 
			
		||||
        return undefined;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      return !(loggedIn && (account._account_id === change.owner._account_id));
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user