Skip to content

Commit

Permalink
fix: universal issue (#177)
Browse files Browse the repository at this point in the history
* fix: change injection to optional

* chore: stop tracking settings

* chore: remove settings
  • Loading branch information
maxisam authored May 6, 2019
1 parent 493530c commit 6891cd9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 29 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ node_modules
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
Expand Down
25 changes: 0 additions & 25 deletions .vscode/settings.json

This file was deleted.

4 changes: 2 additions & 2 deletions projects/ngx-clipboard/src/lib/ngx-clipboard.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Inject, Injectable } from '@angular/core';
import { Inject, Injectable, Optional } from '@angular/core';
import { DOCUMENT } from '@angular/platform-browser';
import { WINDOW } from 'ngx-window-token';

Expand All @@ -7,7 +7,7 @@ import { WINDOW } from 'ngx-window-token';
@Injectable({ providedIn: 'root' })
export class ClipboardService {
private tempTextArea: HTMLTextAreaElement | undefined;
constructor(@Inject(DOCUMENT) public document: any, @Inject(WINDOW) private window: any) {}
constructor(@Inject(DOCUMENT) public document: any, @Optional() @Inject(WINDOW) private window: any) {}
public get isSupported(): boolean {
return !!this.document.queryCommandSupported && !!this.document.queryCommandSupported('copy') && !!this.window;
}
Expand Down

0 comments on commit 6891cd9

Please sign in to comment.