Skip to content

Commit 0d693c5

Browse files
authored
fix: bytes.toData can only be called from js thread (#21)
1 parent ea6543f commit 0d693c5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ios/HybridRiveFileFactory.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,9 @@ final class HybridRiveFileFactory: HybridRiveFileFactorySpec, @unchecked Sendabl
149149
(any HybridRiveFileSpec)
150150
>
151151
{
152+
let data = bytes.toData(copyIfNeeded: false)
152153
return try genericFrom(
153-
check: { bytes.toData(copyIfNeeded: false) },
154+
check: { data },
154155
prepare: { $0 },
155156
fileWithCustomAssetLoader: { (data, loader) in
156157
try RiveFile(data: data, loadCdn: loadCdn, customAssetLoader: loader)

0 commit comments

Comments
 (0)