Skip to content

Commit

Permalink
feat(router): fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jwx committed Oct 8, 2019
1 parent 284d385 commit ac4f884
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/router/src/link-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class LinkHandler {

// private handler: EventListener;

constructor(
public constructor(
dom: HTMLDOM
) {
this.window = dom.window;
Expand Down
5 changes: 3 additions & 2 deletions packages/router/src/resources/au-href.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class AuHrefCustomAttribute {
public value: unknown;

private hasHref: boolean | null = null;
constructor(
public constructor(
@INode private readonly element: HTMLElement,
) { }

Expand All @@ -23,7 +23,8 @@ export class AuHrefCustomAttribute {
this.hasHref = this.element.hasAttribute('href');
}
if (!this.hasHref) {
const value = typeof this.value === 'string' ? this.value : JSON.stringify(this.value)
// TODO: Figure out a better value here for non-strings (using InstructionResolver?)
const value = typeof this.value === 'string' ? this.value : JSON.stringify(this.value);
this.element.setAttribute('href', value);
}
}
Expand Down

0 comments on commit ac4f884

Please sign in to comment.