mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 20:06:08 +01:00
fix error when saving unprotected notes
This commit is contained in:
@@ -17,9 +17,18 @@ module.exports = function(req) {
|
||||
return protected_session.getDataKey(req);
|
||||
}
|
||||
|
||||
function getDataKeyOrNull() {
|
||||
if (!isProtectedSessionAvailable()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return protected_session.getDataKey(req);
|
||||
}
|
||||
|
||||
return {
|
||||
browserId,
|
||||
isProtectedSessionAvailable,
|
||||
getDataKey
|
||||
getDataKey,
|
||||
getDataKeyOrNull
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user