fix: refactor Analytics to use memo

This commit is contained in:
LuanRT
2022-07-06 17:34:31 -03:00
parent f52d15cdb0
commit dff535a9e2

View File

@@ -12,10 +12,7 @@ class Analytics {
constructor(response) {
this.#page = Parser.parseResponse(response);
const tab = this.#page.contents.tabs.get({ selected: true });
const item = tab.content.contents.get({ target_id: null });
this.sections = item.contents;
this.sections = this.#page.contents_memo.get('Element');
}
get page() {
@@ -23,4 +20,4 @@ class Analytics {
}
}
module.exports = Analytics;
module.exports = Analytics;