Skip to content

Commit 96f495a

Browse files
committed
refactor(@Detect): remove source field
Ambigious information. Previously required when `QrcodeDropZone` and `QrcodeStream` where one component. BREAKING CHANGE: `source` field removed from @Detect payload.
1 parent 3bbe969 commit 96f495a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/components/QrcodeCapture.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default {
3131
const imageData = await imageDataFromFile(file);
3232
const scanResult = await scan(imageData);
3333
34-
return { source: "file", ...scanResult };
34+
return scanResult;
3535
}
3636
}
3737
};

src/components/QrcodeDropZone.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ export default {
4141
const imageData = await imageDataFromFile(file);
4242
const scanResult = await scan(imageData);
4343
44-
return { source: "file", ...scanResult };
44+
return scanResult;
4545
},
4646
4747
async processUrl(url) {
4848
const imageData = await imageDataFromUrl(url);
4949
const scanResult = await scan(imageData);
5050
51-
return { source: "url", ...scanResult };
51+
return scanResult;
5252
},
5353
5454
async processUrl(url) {

src/components/QrcodeStream.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export default {
187187
188188
startScanning() {
189189
const detectHandler = result => {
190-
this.onDetect(Promise.resolve({ source: "stream", ...result }));
190+
this.onDetect(Promise.resolve(result));
191191
};
192192
193193
// this.stopScanning()

0 commit comments

Comments
 (0)