fix for bundler complaining about return outside of function

Hi, while using browserify to bundle the module it complains that the return inside the first if on index.js is outside a function

instead of a return, could the other code be moved inside an else? cheers!
This commit is contained in:
jgarces-tw 2019-02-18 15:05:06 +01:00 коммит произвёл GitHub
Родитель f16156fa94
Коммит ad6754c3f4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 13 добавлений и 15 удалений

Просмотреть файл

@ -1,20 +1,18 @@
if process.platform != 'win32'
return
if process.platform == 'win32'
require './format.oids'
require './format.oids'
@der2 = require './der2'
@der2 = require './der2'
nApi = !!process.versions.napi
nApi &&= @ == require '../fallback'
nApi &&= not @electron = do require 'is-electron'
nApi = !!process.versions.napi
nApi &&= @ == require '../fallback'
nApi &&= not @electron = do require 'is-electron'
@each = require if @nApi = nApi
'./each'
else
'./each.fallback'
@each = require if @nApi = nApi
'./each'
else
'./each.fallback'
@all = require './all'
@all = require './all'
require './inject'
require './save'
require './inject'
require './save'