You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the electronic application, when I start nodeintegration, the program appears default-encoding.js? 9f9d:10 Uncaught TypeError: Cannot read property 'split' of undefined
#103
var defaultEncoding
/* istanbul ignore next */
if (global.process && global.process.browser) {
defaultEncoding = 'utf-8'
} else if (global.process && global.process.version) {
console.log('process.version', process.version) // undefined
console.log('global.process.version', global.process.version) // v12.18.3
// This line needs to be modified to "global.process.version"
// var pVersionMajor = parseInt(process.version.split('.')[0].slice(1), 10)
// like this
var pVersionMajor = parseInt(global.process.version.split('.')[0].slice(1), 10)
defaultEncoding = pVersionMajor >= 6 ? 'utf-8' : 'binary'
var defaultEncoding
/* istanbul ignore next */
if (global.process && global.process.browser) {
defaultEncoding = 'utf-8'
} else if (global.process && global.process.version) {
console.log('process.version', process.version) // undefined
console.log('global.process.version', global.process.version) // v12.18.3
} else {
defaultEncoding = 'utf-8'
}
module.exports = defaultEncoding
The text was updated successfully, but these errors were encountered: