@kaspernj/api-maker 1.0.258 → 1.0.259

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  ]
17
17
  },
18
18
  "name": "@kaspernj/api-maker",
19
- "version": "1.0.258",
19
+ "version": "1.0.259",
20
20
  "type": "module",
21
21
  "description": "",
22
22
  "main": "index.js",
@@ -75,6 +75,6 @@
75
75
  "eslint-plugin-react": "^7.23.2",
76
76
  "i18n-on-steroids": "^1.0.5",
77
77
  "jest": "^29.0.1",
78
- "jsdom": "^20.0.0"
78
+ "jsdom": "^21.0.0"
79
79
  }
80
80
  }
@@ -98,7 +98,7 @@ export default class ApiMakerBootStrapLiveTableModelRow extends React.PureCompon
98
98
  const {attribute} = digs(column, "attribute")
99
99
  const currentModelClass = this.props.modelClass
100
100
  const path = column.path || []
101
-
101
+ let value
102
102
  let currentModel = model
103
103
 
104
104
  if (path.length > 0) {
@@ -109,8 +109,7 @@ export default class ApiMakerBootStrapLiveTableModelRow extends React.PureCompon
109
109
  }
110
110
 
111
111
  if (!(attribute in currentModel)) throw new Error(`${currentModelClass.modelName().name} doesn't respond to ${attribute}`)
112
-
113
- const value = currentModel[attribute]()
112
+ if (currentModel.isAttributeLoaded(attribute)) value = currentModel[attribute]()
114
113
 
115
114
  return this.presentColumnValue(value)
116
115
  }