Skip to content

Commit

Permalink
fix: resourceManager copyUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloSR06 authored Sep 20, 2023
1 parent a201425 commit cad07e9
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@ export class DnnActionCopyUrl {
@Prop() items!: Item[];

private handleClick(): void {
const url = `${window.location.protocol}//${window.location.host}${this.items[0].path}`;
navigator.clipboard.writeText(url);
let t;
if (this.items[0].path.includes(":")) {
t = `${this.items[0].path}`;
} else {
t = `${window.location.protocol}//${window.location.host}${this.items[0].path}`;
}
navigator.clipboard.writeText(t);
}

render() {
Expand Down

0 comments on commit cad07e9

Please sign in to comment.