react-native-onyx 3.0.104 → 3.0.105

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.
@@ -50,7 +50,14 @@ const initPromise = new Promise((resolve) => {
50
50
  * Degrade performance by removing the storage provider and only using cache
51
51
  */
52
52
  function degradePerformance(error) {
53
- Logger.logHmmm(`Error while using ${provider.name}. Falling back to only using cache and dropping storage.\n Error: ${error.message}\n Stack: ${error.stack}\n Cause: ${error.cause}`);
53
+ let causeMessage = '';
54
+ if (error.cause instanceof Error) {
55
+ causeMessage = error.cause.message;
56
+ }
57
+ else if (typeof error.cause === 'string') {
58
+ causeMessage = error.cause;
59
+ }
60
+ Logger.logHmmm(`Error while using ${provider.name}. Falling back to only using cache and dropping storage.\n Error: ${error.message}\n Stack: ${error.stack}\n Cause: ${causeMessage}`);
54
61
  console.error(error);
55
62
  provider = MemoryOnlyProvider_1.default;
56
63
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-onyx",
3
- "version": "3.0.104",
3
+ "version": "3.0.105",
4
4
  "author": "Expensify, Inc.",
5
5
  "homepage": "https://expensify.com",
6
6
  "description": "State management for React Native",