react-native-unistyles 2.41.0 → 2.42.0
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/cxx/UnistylesModel.cpp +1 -1
- package/package.json +1 -1
package/cxx/UnistylesModel.cpp
CHANGED
@@ -110,7 +110,7 @@ std::vector<std::pair<std::string, double>> UnistylesModel::toSortedBreakpointPa
|
|
110
110
|
// ref: https://github.com/facebook/react-native/pull/43375
|
111
111
|
// ref: https://github.com/facebook/react-native/blob/b5fd041917d197f256433a41a126f0dff767c429/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.cpp#L42
|
112
112
|
void UnistylesModel::emitDeviceEvent(const std::string eventType, EventPayload payload) {
|
113
|
-
this->runOnJSThread([this,
|
113
|
+
this->runOnJSThread([this, eventType, payload = std::move(payload)](jsi::Runtime& rt){
|
114
114
|
jsi::Value emitter = rt.global().getProperty(rt, "__rctDeviceEventEmitter");
|
115
115
|
|
116
116
|
if (emitter.isUndefined()) {
|