Bring in latest changes

This commit is contained in:
Christopher Schleiden
2023-01-09 14:03:56 -08:00
parent 02946d388a
commit 7ba0613401
5 changed files with 12 additions and 2469 deletions
@@ -8,4 +8,12 @@ describe("dictionary", () => {
expect(d.pairs()).toEqual([{ key: "ABC", value: new StringData("val") }]);
});
it("does not add duplicate entries", () => {
const d = new Dictionary();
d.add("ABC", new StringData("val1"));
d.add("abc", new StringData("val2"));
expect(d.pairs()).toEqual([{ key: "ABC", value: new StringData("val1") }]);
});
});
+1 -1
View File
@@ -30,7 +30,7 @@ export class Dictionary implements ExpressionDataInterface {
}
add(key: string, value: ExpressionData) {
if (this.indexMap[key.toLowerCase()]) {
if (key.toLowerCase() in this.indexMap) {
return;
}