Skip to content

Commit

Permalink
fix: remove history in gitignore and keep the if clause outside of th…
Browse files Browse the repository at this point in the history
…e try block
  • Loading branch information
shirly-chen-awx authored and dmengelt committed Dec 5, 2022
1 parent e06dcf7 commit 77ac315
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -26,6 +26,5 @@ yarn-error.log*

*.orig
.env
.history
.bit/
.bitmap
17 changes: 9 additions & 8 deletions src/lib/button-manager.ts
Expand Up @@ -76,17 +76,18 @@ export class ButtonManager {
}

async mount(element: Element): Promise<void> {
try {
if (!this.isGooglePayLoaded()) {
if (!this.isGooglePayLoaded()) {
try {
await loadScript('https://pay.google.com/gp/p/js/pay.js');
}
} catch(err) {
if (this.config?.onError) {
this.config.onError(err as Error);
} else {
console.error(err);
} catch(err) {
if (this.config?.onError) {
this.config.onError(err as Error);
} else {
console.error(err);
}
}
}



this.element = element;
Expand Down

0 comments on commit 77ac315

Please sign in to comment.