smart-on-fhir-tutorial
smart-on-fhir-tutorial copied to clipboard
Application may see a JavaScript error due to insufficient Observation data
The sample application can run into a JavaScript error when the response from the server does not have the appropriate Observation data. The application should ensure that data is valid before accessing the data.
The component
object can be nil. Currently the find
function is accessing this component
object without checking.
https://github.com/cerner/smart-on-fhir-tutorial/blob/gh-pages/example-smart-app/src/js/example-smart-app.js#L92-L93