Skip to content
Snippets Groups Projects
Verified Commit 67acf388 authored by Jan Loewe's avatar Jan Loewe :speech_balloon:
Browse files

fix(dcc element): disable observer on cheerio elements

parent e4969c98
No related branches found
No related tags found
No related merge requests found
......@@ -14,11 +14,11 @@
"install": "npm run build"
},
"dependencies": {
"@types/cheerio": "^0.22.11",
"cheerio": "^1.0.0-rc.2",
"@types/chai": "^4.1.7",
"@types/cheerio": "^0.22.11",
"@types/mocha": "^5.2.6",
"chai": "^4.2.0",
"cheerio": "^1.0.0-rc.2",
"mocha": "^6.0.2",
"nyc": "^13.3.0",
"prettier": "^1.16.4",
......
......@@ -15,6 +15,9 @@ export abstract class DCCElement {
this.$ = options.$;
this.$el = options.$el;
}
Object.defineProperty(this, "$", { configurable: false });
Object.defineProperty(this, "$el", { configurable: false });
}
public toXML(): string | null {
......
......@@ -14,6 +14,9 @@ export class DCCElementArray<T extends DCCElement> extends Array<T> {
this.$parent.find(childSelector).each((index, contentElement) => {
super.push(new type({ $, $el: $(contentElement) }));
});
Object.defineProperty(this, "$", { configurable: false });
Object.defineProperty(this, "$parent", { configurable: false });
}
public push(...items: T[]): number {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment