Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property 'paypalScriptLoaded' does not exist #163

Open
dearste opened this issue Feb 1, 2022 · 2 comments
Open

Property 'paypalScriptLoaded' does not exist #163

dearste opened this issue Feb 1, 2022 · 2 comments

Comments

@dearste
Copy link

dearste commented Feb 1, 2022

Hi, compiling get this issue:

TS2339: Property 'paypalScriptLoaded' does not exist on type 'Window & typeof globalThis'.

How to fix?

@dimasch
Copy link
Contributor

dimasch commented Feb 1, 2022

Hi, @dearste
What a VSF version are you using?

@dimasch
Copy link
Contributor

dimasch commented Feb 1, 2022

@dearste This is specifics for you TS version on local, possible workaround https://stackoverflow.com/questions/12709074/how-do-you-explicitly-set-a-new-property-on-window-in-typescript/56402425#56402425

Or fast fix in use window['paypalScriptLoaded'] instead window.paypalScriptLoaded

if (!isServer && config.hasOwnProperty('paypal') && config.paypal.addJsToGlobalHead && window['paypalScriptLoaded'] === undefined) {
   ...
    window['paypalScriptLoaded']  = true
  }

if (!isServer && config.hasOwnProperty('paypal') && config.paypal.addJsToGlobalHead && window.paypalScriptLoaded === undefined) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants