Closed nickykln closed 5 years ago
Thanks @nickykln can you explain what is different here? I just went through it. Was hard to notice anything different besides formatting changes. Please just let me know where you made changes.
Did you just put these changes in? https://github.com/firescript/nativescript-contacts/issues/33#issuecomment-411483106
Hi @firescript
Sorry for the formatting differences.
Actually I just implemented the fix explained by DeepakArora76 in the comment of #33
Replace the following lines in the files index.ios.js and index.andriod.js
exports.getAllContacts = function(contactFields) { return new Promise(function (resolve, reject) { var worker = new Worker('./get-all-contacts-worker.js');
exports.getAllContacts = function(contactFields) { return new Promise(function (resolve, reject) { var worker; // Check if webpack is used, in which case, load using webpack loader, otherwise load using relative path // Using webpack assumes that the nativescript worker loader is properly configured. See https://github.com/NativeScript/worker-loader if (global["TNS_WEBPACK"]) { var myWorker = require('nativescript-worker-loader!./get-all-contacts-worker.js'); worker = new myWorker(); } else { worker = new Worker('./get-all-contacts-worker.js'); // relative for caller script path }
Do you want me to make another pull request or you prefer to do it yourself ?
Thanks,
Nicolas
Hi @firescript,
Did you have time to review this pull request ? Let me know if you want me to clear the formating issue ?
thnaks,
Nicolas
thanks @nickykln
Hello, I fixed this issue while compiling with Web Pack. #33
Nicolas