better default password handling
This commit is contained in:
parent
e31a50478e
commit
b8e1708ee4
3 changed files with 8 additions and 5 deletions
4
dist/bundle.es.js
vendored
4
dist/bundle.es.js
vendored
|
@ -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
5
dist/bundle.js
vendored
|
@ -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) {
|
||||
|
|
|
@ -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') {
|
||||
|
|
Loading…
Reference in a new issue