react-native-onyx 3.0.146 → 3.0.148
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/dist/Onyx.js +2 -2
- package/dist/OnyxSubscriptionManager.js +1 -1
- package/package.json +1 -1
package/dist/Onyx.js
CHANGED
|
@@ -697,7 +697,7 @@ function exportState() {
|
|
|
697
697
|
* @returns The current value, or `undefined` if the key has none.
|
|
698
698
|
*/
|
|
699
699
|
function get(key) {
|
|
700
|
-
return OnyxUtils_1.default.afterInit(() =>
|
|
700
|
+
return OnyxUtils_1.default.afterInit(() => Promise.resolve(OnyxSubscriptionManager_1.default.getState(key)));
|
|
701
701
|
}
|
|
702
702
|
/**
|
|
703
703
|
* Reads several Onyx keys at once, without subscribing. Use `useOnyx()` or `Onyx.connectWithoutView()` when
|
|
@@ -718,7 +718,7 @@ function get(key) {
|
|
|
718
718
|
*/
|
|
719
719
|
function multiGet(keys) {
|
|
720
720
|
// map() widens the key tuple to an array, so the per-slot value types survive only through the cast.
|
|
721
|
-
return OnyxUtils_1.default.afterInit(() => Promise.resolve(keys.map((key) =>
|
|
721
|
+
return OnyxUtils_1.default.afterInit(() => Promise.resolve(keys.map((key) => OnyxSubscriptionManager_1.default.getState(key))));
|
|
722
722
|
}
|
|
723
723
|
const Onyx = {
|
|
724
724
|
METHOD: OnyxUtils_1.default.METHOD,
|
|
@@ -43,7 +43,7 @@ const storage_1 = __importDefault(require("./storage"));
|
|
|
43
43
|
const reportedCacheMisses = new Set();
|
|
44
44
|
function reportCacheMissIfStorageHasValue(key) {
|
|
45
45
|
var _a;
|
|
46
|
-
if (
|
|
46
|
+
if (!OnyxCache_1.default.getAllKeys().has(key) || OnyxKeys_1.default.isRamOnlyKey(key) || OnyxCache_1.default.hasNullishStorageKey(key)) {
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
49
|
const reportKey = (_a = OnyxKeys_1.default.getCollectionKey(key)) !== null && _a !== void 0 ? _a : key;
|