From ff18fa7b7f651ee8816d9cb50be0c350798336ee Mon Sep 17 00:00:00 2001 From: "Alex P." Date: Wed, 2 Oct 2024 17:41:54 +0300 Subject: [PATCH] Fix lint --- .../js/Preview/GooglePayPreviewButton.js | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/modules/ppcp-googlepay/resources/js/Preview/GooglePayPreviewButton.js b/modules/ppcp-googlepay/resources/js/Preview/GooglePayPreviewButton.js index 7387c97aa..59a70cfb4 100644 --- a/modules/ppcp-googlepay/resources/js/Preview/GooglePayPreviewButton.js +++ b/modules/ppcp-googlepay/resources/js/Preview/GooglePayPreviewButton.js @@ -4,12 +4,11 @@ import PreviewButton from '../../../../ppcp-button/resources/js/modules/Preview/ /** * A single GooglePay preview button instance. */ -export default class GooglePayPreviewButton extends PreviewButton { /** - * Instance of the preview button. - * - * @type {?PaymentButton} - */ - #button = null; +export default class GooglePayPreviewButton extends PreviewButton { + /** + * @type {?PaymentButton} + */ + #button = null; constructor( args ) { super( args ); @@ -27,18 +26,18 @@ export default class GooglePayPreviewButton extends PreviewButton { /** } createButton( buttonConfig ) { - if (!this.#button) { - this.#button = new GooglepayButton( - 'preview', - null, - buttonConfig, - this.ppcpConfig - ); - } + if ( ! this.#button ) { + this.#button = new GooglepayButton( + 'preview', + null, + buttonConfig, + this.ppcpConfig + ); + } - this.#button.configure( this.apiConfig, null ); - this.#button.applyButtonStyles( buttonConfig, this.ppcpConfig ); - this.#button.reinit(); + this.#button.configure( this.apiConfig, null ); + this.#button.applyButtonStyles( buttonConfig, this.ppcpConfig ); + this.#button.reinit(); } /**