Skip to content

Commit

Permalink
chore(developer): unboxing fix for displays
Browse files Browse the repository at this point in the history
Fixes: #12208
  • Loading branch information
srl295 committed Sep 6, 2024
1 parent 1cb33da commit 06a5683
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ export class LDMLKeyboardXMLSourceFileReader {
if (!source.keyboard3.forms.import) {
source.keyboard3.forms.import = [];
}
if (!source.keyboard3.displays) {
source.keyboard3.displays = {
display: [],
displayOptions: {},
};
}
}
boxXmlArray(source?.keyboard3, 'layers');
boxXmlArray(source?.keyboard3?.displays, 'display');
Expand Down
2 changes: 1 addition & 1 deletion developer/src/kmc-ldml/test/test-disp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('disp', function () {

it('should compile minimal disp', async function() {
let disp = await loadSectionFixture(DispCompiler, 'sections/disp/minimal.xml', compilerTestCallbacks) as Disp;
assert.equal(compilerTestCallbacks.messages.length, 0);
assert.sameDeepMembers(compilerTestCallbacks.messages, []);

assert.ok(disp?.disps);
assert.equal(disp.disps.length, 0);
Expand Down

0 comments on commit 06a5683

Please sign in to comment.