Skip to content

Commit

Permalink
修改rnoh依赖,适配ohpm1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
425765923 committed Jan 31, 2024
1 parent 59c5e7e commit dd3295c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
Binary file modified packages/default-storage/harmony/async_storage.har
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"license": "",
"devDependencies": {
"rnoh": "file:../rnoh"

},
"author": "",
"name": "rnoh-async-storage",
"description": "",
"main": "",
"main": "ts.ts",
"version": "2.5.1",
"dependencies": {}
"dependencies": {
"rnoh": "file:../rnoh"
}
}
2 changes: 1 addition & 1 deletion packages/default-storage/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-oh-library/async-storage",
"version": "1.21.0-0.1.1",
"version": "1.21.0-0.1.2",
"description": "Asynchronous, persistent, key-value storage system for React Native.",
"main": "lib/commonjs/index.js",
"module": "lib/module/index.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/default-storage/src/RCTAsyncStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { shouldFallbackToLegacyNativeModule } from "@react-native-async-storage/
// TurboModuleRegistry falls back to NativeModules so we don't have to try go
// assign NativeModules' counterparts if TurboModuleRegistry would resolve
// with undefined.
let RCTAsyncStorage = TurboModuleRegistry
? Platform.OS === "harmony"
// @ts-ignore
let RCTAsyncStorage = TurboModuleRegistry ? Platform.OS === "harmony"
? TurboModuleRegistry.get("RNCAsyncStorage")
: TurboModuleRegistry.get("PlatformLocalStorage") || // Support for external modules, like react-native-windows
TurboModuleRegistry.get("RNC_AsyncSQLiteDBStorage") ||
Expand Down

0 comments on commit dd3295c

Please sign in to comment.