@hedia/recommendation-screen 2.1.30 → 2.1.31

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/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # **Recommendation Screen**
2
2
 
3
3
  ### **Usage**
4
+ Run the `index-git.sh` script before building.
4
5
 
5
6
  ### **Auto-publishing to npm as an alpha-version package**
6
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hedia/recommendation-screen",
3
- "version": "2.1.30",
3
+ "version": "2.1.31",
4
4
  "description": "Hedia Recommendation Screen for Bolus and Carbohydrates",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -176,7 +176,7 @@ export default class RecommendationScreen extends React.Component<IRecommendatio
176
176
  * Called immediately after a component is mounted. Setting state here will trigger re-rendering.
177
177
  *
178
178
  * Steps:
179
- * 1. Create a listener to call the handleAppStateChange() method when the app state changes.
179
+ * 1. If there is no error, create a listener to call the handleAppStateChange() method when the app state changes.
180
180
  */
181
181
  componentDidMount(): void;
182
182
  /**
@@ -386,10 +386,12 @@ export default class RecommendationScreen extends React.Component {
386
386
  * Called immediately after a component is mounted. Setting state here will trigger re-rendering.
387
387
  *
388
388
  * Steps:
389
- * 1. Create a listener to call the handleAppStateChange() method when the app state changes.
389
+ * 1. If there is no error, create a listener to call the handleAppStateChange() method when the app state changes.
390
390
  */
391
391
  componentDidMount() {
392
- this.appStateSubscription = AppState.addEventListener(`change`, this.handleAppStateChange);
392
+ if (!this.hasError) {
393
+ this.appStateSubscription = AppState.addEventListener(`change`, this.handleAppStateChange);
394
+ }
393
395
  }
394
396
  /**
395
397
  * Called immediately before a component is destroyed.