@file-viewer/core 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -141,7 +141,7 @@ export const createFileViewerTextDecoder = (encoding) => {
|
|
|
141
141
|
}
|
|
142
142
|
catch (error) {
|
|
143
143
|
if (encoding === 'gb18030' && error instanceof RangeError) {
|
|
144
|
-
throw new Error('This browser does not provide GB18030 text decoding. Use a current browser or select UTF-8 explicitly.');
|
|
144
|
+
throw Object.assign(new Error('This browser does not provide GB18030 text decoding. Use a current browser or select UTF-8 explicitly.'), { cause: error });
|
|
145
145
|
}
|
|
146
146
|
throw error;
|
|
147
147
|
}
|
package/package.json
CHANGED