Skip to content

Commit 3afb46a

Browse files
authored
fix:修复使用fetch请求传输json数据报错的问题 (#35)
1 parent 11f99fd commit 3afb46a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

harmony/blobUtil/src/main/ets/ReactNativeBlobUtil/ReactNativeBlobUtilReq.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ export default class ReactNativeBlobUtilReq {
292292
}
293293

294294
isPathStr(str: string): boolean {
295-
return !!(str.indexOf(FILE_PREFIX) || str.indexOf(CONTENT_PREFIX) || str.indexOf('/') === 0);
295+
return !!(str.startsWith(FILE_PREFIX) || str.startsWith(CONTENT_PREFIX) || str.indexOf('/') === 0);
296296
}
297297

298298
getABData(isPath: boolean, data: string): ArrayBuffer {

0 commit comments

Comments
 (0)