mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-08 19:57:46 -04:00
Prevent error in Electron due to NWJS code
Former-commit-id: 38afb9bb4c3848b63cf4ae45b3e3142200b71db5 [formerly 7ea10eb85b2a1f4857da1a6a20b67dc23d69b732] Former-commit-id: 3a61d478b45485e21da399b12edc7519efff9579
This commit is contained in:
parent
cc8688fa2d
commit
3534459e9c
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "kiwix_js_windows",
|
||||
"productName": "Kiwix JS for Windows Electron Edition",
|
||||
"version": "0.9.93E",
|
||||
"version": "0.9.97E",
|
||||
"description": "Kiwix JS Windows Electron",
|
||||
"main": "main.js",
|
||||
"build-packaged": {
|
||||
|
@ -163,7 +163,7 @@ define(['q'], function(Q) {
|
||||
reject(err);
|
||||
} else {
|
||||
var size = end - begin;
|
||||
var arr = Buffer.alloc(size) || new Uint8Array(size);
|
||||
var arr = typeof Buffer !== 'undefined' && Buffer.alloc(size) || new Uint8Array(size);
|
||||
fs.read(fd, arr, 0, size, begin, function (err, bytesRead, data) {
|
||||
if (err) reject(err);
|
||||
fs.close(fd, function (err) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user