mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix: equal
This commit is contained in:
parent
ab7a07a318
commit
49d1c5140e
@ -7,7 +7,7 @@ const BAttribute = require('../becca/entities/battribute');
|
|||||||
const {formatAttrForSearch} = require("./attribute_formatter");
|
const {formatAttrForSearch} = require("./attribute_formatter");
|
||||||
const BUILTIN_ATTRIBUTES = require("./builtin_attributes");
|
const BUILTIN_ATTRIBUTES = require("./builtin_attributes");
|
||||||
|
|
||||||
const ATTRIBUTE_TYPES = [ 'label', 'relation' ];
|
const ATTRIBUTE_TYPES = ['label', 'relation'];
|
||||||
|
|
||||||
/** @returns {BNote[]} */
|
/** @returns {BNote[]} */
|
||||||
function getNotesWithLabel(name, value = undefined) {
|
function getNotesWithLabel(name, value = undefined) {
|
||||||
@ -122,7 +122,7 @@ function isAttributeType(type) {
|
|||||||
|
|
||||||
function isAttributeDangerous(type, name) {
|
function isAttributeDangerous(type, name) {
|
||||||
return BUILTIN_ATTRIBUTES.some(attr =>
|
return BUILTIN_ATTRIBUTES.some(attr =>
|
||||||
attr.type === attr.type &&
|
attr.type === type &&
|
||||||
attr.name.toLowerCase() === name.trim().toLowerCase() &&
|
attr.name.toLowerCase() === name.trim().toLowerCase() &&
|
||||||
attr.isDangerous
|
attr.isDangerous
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user