Skip to content

Commit

Permalink
Use javascript utils
Browse files Browse the repository at this point in the history
  • Loading branch information
sagesmith-wf committed May 22, 2023
1 parent a3873bd commit 0605c83
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
14 changes: 2 additions & 12 deletions iXBRLViewerPlugin/viewer/src/js/fact.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,21 +183,11 @@ export class Fact {
}

hasExplicitDimension() {
for (const d in this.dimensions()) {
if (!this._report.getConcept(d).isTypedDimension()) {
return true;
}
}
return false;
return this.dimensions().some(d => !this._report.getConcept(d).isTypedDimension());
}

hasTypedDimension() {
for (const d in this.dimensions()) {
if (this._report.getConcept(d).isTypedDimension()) {
return true;
}
}
return false;
return this.dimensions().some(d => this._report.getConcept(d).isTypedDimension());
}

isMonetaryValue() {
Expand Down
6 changes: 1 addition & 5 deletions iXBRLViewerPlugin/viewer/src/js/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,7 @@ iXBRLReport.prototype.getIXNodeForItemId = function(id) {
}

iXBRLReport.prototype.facts = function() {
const allItems = [];
for (const id in this.data.facts) {
allItems.push(this.getItemById(id));
}
return allItems;
return this.data.facts.map(id => this.getItemById(id));
}

iXBRLReport.prototype.filingDocuments = function() {
Expand Down

0 comments on commit 0605c83

Please sign in to comment.