better default password handling

This commit is contained in:
Sean Yesmunt 2019-10-14 23:21:17 -04:00
parent e31a50478e
commit b8e1708ee4
3 changed files with 8 additions and 5 deletions

4
dist/bundle.es.js vendored
View file

@ -2404,7 +2404,9 @@ function doSetSync(oldHash, newHash, data) {
});
};
}
function doGetSync(password = '', callback) {
function doGetSync(passedPassword, callback) {
const password = passedPassword === null || passedPassword === undefined ? '' : passedPassword;
function handleCallback() {
if (callback) {
if (typeof callback !== 'function') {

5
dist/bundle.js vendored
View file

@ -3967,9 +3967,8 @@ function doSetSync(oldHash, newHash, data) {
});
};
}
function doGetSync() {
var password = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
var callback = arguments.length > 1 ? arguments[1] : undefined;
function doGetSync(passedPassword, callback) {
var password = passedPassword === null || passedPassword === undefined ? '' : passedPassword;
function handleCallback() {
if (callback) {

View file

@ -77,7 +77,9 @@ export function doSetSync(oldHash, newHash, data) {
};
}
export function doGetSync(password = '', callback) {
export function doGetSync(passedPassword, callback) {
const password = passedPassword === null || passedPassword === undefined ? '' : passedPassword;
function handleCallback() {
if (callback) {
if (typeof callback !== 'function') {