Skip to content

Commit d797cca

Browse files
author
Andrzej Jurzak
committed
Code formatting.
1 parent 531ef43 commit d797cca

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

src/service.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class Service implements IService {
6969
/**
7070
* A list of components that this service can embed
7171
*/
72-
private static components: (typeof Report | typeof Tile | typeof Dashboard)[] = [
72+
private static components: (typeof Report | typeof Tile | typeof Dashboard)[] = [
7373
Tile,
7474
Report,
7575
Dashboard
@@ -170,7 +170,7 @@ export class Service implements IService {
170170
let powerBiElement = <IPowerBiElement>element;
171171
const component = new Create(this, powerBiElement, config);
172172
powerBiElement.powerBiEmbed = component;
173-
173+
174174
this.addOrOverwriteEmbed(component, element);
175175

176176
return component;
@@ -266,11 +266,11 @@ export class Service implements IService {
266266
/**
267267
* When loading report after create we want to use existing Iframe to optimize load period
268268
*/
269-
if(config.type === "report" && component.config.type === "create") {
269+
if (config.type === "report" && component.config.type === "create") {
270270
const report = new Report(this, element, config, element.powerBiEmbed.iframe);
271271
report.load(<embed.IInternalEmbedConfiguration>config);
272272
element.powerBiEmbed = report;
273-
273+
274274
this.addOrOverwriteEmbed(component, element);
275275

276276
return report;
@@ -323,7 +323,7 @@ export class Service implements IService {
323323

324324
addOrOverwriteEmbed(component: embed.Embed, element: HTMLElement): void {
325325
// remove embeds over the same div element.
326-
this.embeds = this.embeds.filter(function(embed) {
326+
this.embeds = this.embeds.filter(function (embed) {
327327
return embed.element.id !== element.id;
328328
});
329329

@@ -349,14 +349,14 @@ export class Service implements IService {
349349
delete powerBiElement.powerBiEmbed;
350350
/** Removes the iframe from the element. */
351351
const iframe = element.querySelector('iframe');
352-
if (iframe) {
353-
if (iframe.remove !== undefined) {
354-
iframe.remove();
355-
} else {
356-
// workaround for IE: Unhandled rejection TypeError: object doesn't support property or method 'remove'
357-
iframe.parentElement.removeChild(iframe);
358-
}
359-
}
352+
if (iframe) {
353+
if (iframe.remove !== undefined) {
354+
iframe.remove();
355+
} else {
356+
// workaround for IE: Unhandled rejection TypeError: object doesn't support property or method 'remove'
357+
iframe.parentElement.removeChild(iframe);
358+
}
359+
}
360360
}
361361

362362
/**

tslint.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"extends": "tslint:recommended",
33
"rules": {
4-
"max-line-length": false,
4+
"max-line-length": [false],
55
"member-access": false,
6-
"no-console": false,
6+
"no-console": [false],
77
"one-line": [
88
"check-whitespace",
99
"check-open-brace"
@@ -12,13 +12,13 @@
1212
"single",
1313
"avoid-escape"
1414
],
15-
"trailing-comma": false,
15+
"trailing-comma": [false],
1616
"whitespace": [
1717
"check-branch",
1818
"check-decl",
1919
"check-operator",
2020
"check-module",
21-
"check-seperator",
21+
"check-separator",
2222
"check-type"
2323
],
2424
"object-literal-sort-keys": false

0 commit comments

Comments
 (0)