Open VarunBatraIT opened 1 month ago
I used following modification for the time being after searching in source-code
const maintenances = note.getLabels('maintenance').map(l => l.value);
maintenance = maintenances.reduce((a, b) => parseFloat(a) + parseFloat(b), 0)
TriliumNext Version
0.90.8
What operating system are you using?
Other Linux
What is your setup?
Server access only
Operating System Version
Docker
Description
I have a setup in which I am adding multiple label values where label name is maintenance.
node.getLabelValues() works when I create a list
node.getLabelValues() doesn't work when I am using widget.
I have same code placed in both
It doesn't work here:
It works flawlessly here:
Error logs
Object { froca: {…}, attributes: (8) […], targetRelations: [], parents: (1) […], children: [], parentToBranch: {…}, childToBranch: {}, attachments: null, noteId: "1fRdzPCtiOBT", title: "Office-Air-Purifier", … } attachments: null attributes: Array(8) [ "QNPCcsluGWfL", "Ny8swu0XtpXp", "Lm34ABaHhtTt", … ] blobId: "z4PhNX7vuL3xVChQ1m2A" childToBranch: Object { } children: Array [] froca: Object { initializedPromise: Promise { "fulfilled" }, notes: {…}, branches: {…}, … } isProtected: false mime: "text/html" noteId: "1fRdzPCtiOBT" parentToBranch: Object { EwHXBQHkq1ik: "EwHXBQHkq1ik_1fRdzPCtiOBT" } parents: Array [ "EwHXBQHkq1ik" ] targetRelations: Array [ "9GMQ8ZsElGJR" ] title: "Office-Air-Purifier" type: "text"