Skip to content

Commit bdb2b5b

Browse files
authored
Merge pull request #225 from Dynamsoft/_dev
fixed build issue
2 parents 49e39f6 + 01d1062 commit bdb2b5b

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

hello-world/angular/angular.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
"styles": [
2828
"src/styles.css"
2929
],
30-
"scripts": []
30+
"scripts": [],
31+
"baseHref": "./"
3132
},
3233
"configurations": {
3334
"production": {

hello-world/react-hooks/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
2-
"name": "dbrjs-react-sample",
2+
"name": "dbrjs-react-hook-sample",
33
"version": "0.1.0",
44
"private": true,
5+
"homepage": "./",
56
"dependencies": {
67
"@testing-library/jest-dom": "^5.17.0",
78
"@testing-library/react": "^13.4.0",

hello-world/react-hooks/src/components/VideoCapture/VideoCapture.tsx

+4-5
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,10 @@ function VideoCapture() {
8686
alert(errMsg);
8787
}
8888
}
89+
// Resolve pInit promise once initialization is complete.
90+
resolveInit!();
8991
})();
9092

91-
// Resolve pInit promise once initialization is complete.
92-
resolveInit!();
93-
9493
// componentWillUnmount. dispose cvRouter when it's no longer needed
9594
return async () => {
9695
isDestroyed = true;
@@ -99,13 +98,13 @@ function VideoCapture() {
9998
await pInit;
10099
cvRouter?.dispose();
101100
cameraEnhancer?.dispose();
102-
} catch (_) {}
101+
} catch (_) { }
103102
};
104103
}, []);
105104

106105
return (
107106
<div>
108-
<div ref={cameraViewContainer} style={{ width: "100%", height: "70vh" }}></div>
107+
<div ref={cameraViewContainer} style={{ width: "100%", height: "70vh" }}></div>
109108
<br />
110109
Results:
111110
<div ref={resultsContainer} className="results"></div>

hello-world/react/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "dbrjs-react-sample",
33
"version": "0.1.0",
44
"private": true,
5+
"homepage": "./",
56
"dependencies": {
67
"@testing-library/jest-dom": "^5.17.0",
78
"@testing-library/react": "^13.4.0",

0 commit comments

Comments
 (0)