Skip to content

Commit 3a8018b

Browse files
authored
fix: subcomponent does not exist demo.taro file, skipping this case (#2585)
1 parent a41fd45 commit 3a8018b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scripts/rn/copy-file.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ const removeFile = async (url) => {
7676
}
7777

7878
const modify = (fileUrl, importStatement) => {
79+
if(!fse.ensureFileSync(fileUrl)) return
7980
fse.readFile(fileUrl, 'utf8').then((content) => {
8081
let modifiedContent = content
8182
modifiedContent = [importStatement, modifiedContent.slice(0)].join('')

0 commit comments

Comments
 (0)