From 8742f7741bc2c1183b31de8bc82434596ed14b8a Mon Sep 17 00:00:00 2001 From: Andrea Vos Date: Fri, 19 Mar 2021 20:51:18 +0100 Subject: [PATCH] [pt] fix infinite loop (because of invalid value in nouns.sources) --- src/classes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes.js b/src/classes.js index feb28e46a..066711ce0 100644 --- a/src/classes.js +++ b/src/classes.js @@ -567,7 +567,7 @@ export class Noun { this.femPl = femPl ? femPl.split('|') : []; this.neutrPl = neutrPl ? neutrPl.split('|') : []; this.sources = sources ? sources.split(',') : []; - this.sourcesData = sourcesData.map(s => new Source(s)); + this.sourcesData = sourcesData.filter(s => !!s).map(s => new Source(s)); this.approved = !!approved; this.base = base_id; this.author = author;