Skip to content

Commit 1e0b977

Browse files
committed
remove a comment;
1 parent 993cabf commit 1e0b977

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

1.hello-world/12.minimum-code-es6.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ <h1 style="font-size: 1.5em;">Read Barcodes from a Camera</h1>
2727
* LICENSE ALERT - THE END
2828
*/
2929

30-
// DBR.productKeys = "PRODUCT-KEYS";
31-
3230
BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.0/dist/";
3331

3432
let pScanner = null;

1.hello-world/5.read-video-vue/src/components/ImgDecode.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default {
1414
methods: {
1515
async decodeImg(e) {
1616
try {
17-
const reader = await (this.pReader = BarcodeReader.createInstance());
17+
const reader = await (this.pReader = this.pReader || BarcodeReader.createInstance());
1818
let results = await reader.decode(e.target.files[0]);
1919
for(let result of results){
2020
alert(result.barcodeText);

1.hello-world/5.read-video-vue/src/components/VideoDecode.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export default {
9292
},
9393
async mounted() {
9494
try {
95-
const scanner = await (this.pScanner = BarcodeScanner.createInstance());
95+
const scanner = await (this.pScanner = this.pScanner || BarcodeScanner.createInstance());
9696
await scanner.setUIElement(this.$el);
9797
scanner.onFrameRead = (results) => {
9898
for (let result of results) {

0 commit comments

Comments
 (0)