Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe('Test *****useFrameCallback*****', () => {
await render(<InvalidFrameCallback />);
await wait(200);
}).toThrow(
'[Worklets] Tried to synchronously call a non-worklet function `imNotAWorklet` on the UI thread.\nSee https://docs.swmansion.com/react-native-reanimated/docs/guides/troubleshooting#tried-to-synchronously-call-a-non-worklet-function-on-the-ui-thread for more details.',
'[Worklets] Tried to synchronously call a non-worklet function `imNotAWorklet` on the UI thread.\nSee https://docs.swmansion.com/react-native-worklets/docs/guides/troubleshooting#tried-to-synchronously-call-a-non-worklet-function-on-the-ui-thread for more details.',
);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace worklets {
const char SynchronizableUnpackerCode[] =
R"DELIMITER__((function () {
var serializer = !globalThis._WORKLET || globalThis._WORKLETS_BUNDLE_MODE ? function (value, _) {
return (0, _serializable.createSerializable)(value);
return createSerializable(value);
} : globalThis._createSerializable;
function synchronizableUnpacker(synchronizableRef) {
var synchronizable = synchronizableRef;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const char ValueUnpackerCode[] =
} else if (category === 'RemoteFunction') {
var fun = function fun() {
var label = remoteFunctionName ? "function `".concat(remoteFunctionName, "`") : 'anonymous function';
throw new Error("[Worklets] Tried to synchronously call a non-worklet ".concat(label, " on the UI thread.\nSee https://docs.swmansion.com/react-native-reanimated/docs/guides/troubleshooting#tried-to-synchronously-call-a-non-worklet-function-on-the-ui-thread for more details."));
throw new Error("[Worklets] Tried to synchronously call a non-worklet ".concat(label, " on the UI thread.\nSee https://docs.swmansion.com/react-native-worklets/docs/guides/troubleshooting#tried-to-synchronously-call-a-non-worklet-function-on-the-ui-thread for more details."));
};
fun.__remoteFunction = objectToUnpack;
return fun;
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-worklets/src/bundleUnpacker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function bundleValueUnpacker(
? `function \`${remoteFunctionName}\``
: 'anonymous function';
throw new WorkletsError(`Tried to synchronously call a non-worklet ${label} on the UI thread.
See https://docs.swmansion.com/react-native-reanimated/docs/guides/troubleshooting#tried-to-synchronously-call-a-non-worklet-function-on-the-ui-thread for more details.`);
See https://docs.swmansion.com/react-native-worklets/docs/guides/troubleshooting#tried-to-synchronously-call-a-non-worklet-function-on-the-ui-thread for more details.`);
};
remoteFunctionHolder.__remoteFunction = objectToUnpack;
return remoteFunctionHolder;
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-worklets/src/valueUnpacker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function __installUnpacker() {
: 'anonymous function';
// eslint-disable-next-line reanimated/use-worklets-error
throw new Error(`[Worklets] Tried to synchronously call a non-worklet ${label} on the UI thread.
See https://docs.swmansion.com/react-native-reanimated/docs/guides/troubleshooting#tried-to-synchronously-call-a-non-worklet-function-on-the-ui-thread for more details.`);
See https://docs.swmansion.com/react-native-worklets/docs/guides/troubleshooting#tried-to-synchronously-call-a-non-worklet-function-on-the-ui-thread for more details.`);
};
fun.__remoteFunction = objectToUnpack;
return fun;
Expand Down
Loading