mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
make sure content is string for post-processing
This commit is contained in:
parent
18e2e6779b
commit
10f3df3ed4
@ -889,6 +889,10 @@ function scanForLinks(note, content) {
|
|||||||
* Things which have to be executed after updating content, but asynchronously (separate transaction)
|
* Things which have to be executed after updating content, but asynchronously (separate transaction)
|
||||||
*/
|
*/
|
||||||
async function asyncPostProcessContent(note, content) {
|
async function asyncPostProcessContent(note, content) {
|
||||||
|
if (note.hasStringContent() && !utils.isString(content)) {
|
||||||
|
content = content.toString();
|
||||||
|
}
|
||||||
|
|
||||||
scanForLinks(note, content);
|
scanForLinks(note, content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -303,6 +303,10 @@ function toMap(list, key) {
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isString(x) {
|
||||||
|
return Object.prototype.toString.call(x) === "[object String]";
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
randomSecureToken,
|
randomSecureToken,
|
||||||
randomString,
|
randomString,
|
||||||
@ -335,4 +339,5 @@ module.exports = {
|
|||||||
normalize,
|
normalize,
|
||||||
hashedBlobId,
|
hashedBlobId,
|
||||||
toMap,
|
toMap,
|
||||||
|
isString
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user