From 61be155fc3438bc2fda2e5e6ec9fcbb51dbf4608 Mon Sep 17 00:00:00 2001 From: hallgren Date: Mon, 5 Mar 2012 20:47:52 +0000 Subject: [PATCH] gfse: bug fix: avoid hickup when inhertiting from a missing concrete syntax --- src/www/gfse/editor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/www/gfse/editor.js b/src/www/gfse/editor.js index b0a5636d5..4595a2c37 100644 --- a/src/www/gfse/editor.js +++ b/src/www/gfse/editor.js @@ -1130,12 +1130,13 @@ function inherited_grammars(g) { // Load the available grammars once var grammar_byname=cached_grammar_byname(); var visited={}; + function exists(g) { return g; } // Then traverse the dependencies to collect all inherited grammars function ihgs(g) { if(visited[g.basename]) return []; // avoid cycles and diamonds else { visited[g.basename]=true; - var igs=(g.extends || []).map(grammar_byname) + var igs=(g.extends || []).map(grammar_byname).filter(exists); var igss=igs.map(ihgs) for(var i in igss) igs=igs.concat(igss[i]); return igs;