fix: ignore prototype's keys in a handful of for...in loops

This commit is contained in:
narutowyh
2018-01-06 11:57:17 +08:00
committed by kyle
parent bd41b736a8
commit 12a9fbc0ca
3 changed files with 9 additions and 0 deletions

View File

@@ -57,6 +57,9 @@ export class Col extends React.Component {
let classesAr = []
for (let device in DEVICES) {
if (!DEVICES.hasOwnProperty(device)) {
continue
}
let deviceClass = DEVICES[device]
if(device in this.props) {
let val = this.props[device]