From 140f0a5dbd3bd7d9a948dc575d06b323d41c97ef Mon Sep 17 00:00:00 2001 From: zadam Date: Thu, 8 Oct 2020 22:08:58 +0200 Subject: [PATCH] return null for not found attribute, closes #1294 --- docs/frontend_api/entities_note_short.js.html | 2 +- src/public/app/entities/note_short.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/frontend_api/entities_note_short.js.html b/docs/frontend_api/entities_note_short.js.html index 71979c12e..50a6ef531 100644 --- a/docs/frontend_api/entities_note_short.js.html +++ b/docs/frontend_api/entities_note_short.js.html @@ -335,7 +335,7 @@ class NoteShort { getAttribute(type, name) { const attributes = this.getAttributes(type, name); - return attributes.length > 0 ? attributes[0] : 0; + return attributes.length > 0 ? attributes[0] : null; } /** diff --git a/src/public/app/entities/note_short.js b/src/public/app/entities/note_short.js index a3e23112d..f55c175b9 100644 --- a/src/public/app/entities/note_short.js +++ b/src/public/app/entities/note_short.js @@ -307,7 +307,7 @@ class NoteShort { getAttribute(type, name) { const attributes = this.getAttributes(type, name); - return attributes.length > 0 ? attributes[0] : 0; + return attributes.length > 0 ? attributes[0] : null; } /**