@yudiel/react-qr-scanner
Advanced tools
Comparing version 1.2.5 to 1.2.6
{ | ||
"name": "@yudiel/react-qr-scanner", | ||
"version": "1.2.5", | ||
"version": "1.2.6", | ||
"description": "A library to scan qr codes in react.", | ||
@@ -64,3 +64,3 @@ "author": "Yudiel Curbelo", | ||
}, | ||
"packageManager": "yarn@3.3.1" | ||
"packageManager": "yarn@4.0.2" | ||
} |
@@ -0,0 +0,0 @@ ### Features |
@@ -0,0 +0,0 @@ import { useEffect, useState } from 'react'; |
@@ -32,3 +32,14 @@ import { useEffect, useRef, useCallback, useState, useMemo } from 'react'; | ||
if (result) onResultRef.current(result); | ||
if (error && !(error instanceof NotFoundException)) onErrorRef.current(error); | ||
if (error) { | ||
if (error instanceof NotFoundException) { | ||
return; | ||
} | ||
if (error instanceof DOMException && error.name === 'IndexSizeError') { | ||
return; | ||
} | ||
onErrorRef.current(error); | ||
} | ||
}, []); | ||
@@ -42,3 +53,2 @@ | ||
reader.stopAsyncDecode(); | ||
reader.stopContinuousDecode(); | ||
}, [reader]); | ||
@@ -77,3 +87,2 @@ | ||
if (!isMounted.current) { | ||
readerStop(); | ||
readerReset(); | ||
@@ -80,0 +89,0 @@ } |
export * from './components/QrScanner'; | ||
export * from './hooks/useMediaDevices'; |
@@ -0,0 +0,0 @@ export class InsecureContextError extends Error { |
@@ -0,0 +0,0 @@ import { Result } from '@zxing/library'; |
@@ -0,0 +0,0 @@ import isObject from '../utilities/isObject'; |
@@ -0,0 +0,0 @@ import isDateObject from './isDateObject'; |
@@ -0,0 +0,0 @@ import { Primitive } from '../types'; |
@@ -0,0 +0,0 @@ export default function off<T extends Window | Document | HTMLElement | EventTarget>( |
@@ -0,0 +0,0 @@ export default function on<T extends Window | Document | HTMLElement | EventTarget>( |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
3725
4843117