Skip to content

Commit

Permalink
fix: fix for schemas that have multiple entries with the same name
Browse files Browse the repository at this point in the history
e.g. <element name="foo"/> and <attribute name="foo"/>
  • Loading branch information
ajmacdonald committed Feb 7, 2019
1 parent bb56d5a commit d7ca3af
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/js/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,13 @@ function Utilities(writer) {
if (item['@name'] && item['@name'] === tag) {
context = item;
if (i === tags.length - 1) {
match = item;
if (item['$key'] === 'element') {
match = item;
return false;
} else {
// the name matches but we're in define so drill down further
context = item;
}
}
return true;
}
Expand Down

0 comments on commit d7ca3af

Please sign in to comment.