Bring in latest changes
This commit is contained in:
@@ -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") }]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user