File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " @foxcomm/api-js" ,
3- "version" : " 1.2.3 " ,
3+ "version" : " 1.2.4 " ,
44 "description" : " Javascript Library for interacting with FoxCommerce API" ,
55 "main" : " lib/index.js" ,
66 "publishConfig" : {
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ export default class Api {
5050 // add the stripe.js script if in the browser
5151 let stripeLoaded = Promise . resolve ( ) ;
5252
53- if ( isBrowser ( ) ) {
53+ if ( isBrowser ) {
5454 stripeLoaded = loadScript ( 'https://js.stripe.com/v2/' ) . then ( ( ) => {
5555 Stripe . setPublishableKey ( this . stripe_key ) ;
5656 } ) ;
Original file line number Diff line number Diff line change 11import _ from 'lodash' ;
22
3- export function isBrowser ( ) {
4- try {
5- return window ;
6- } catch ( e ) {
7- return false ;
8- }
9- }
3+ export const isBrowser = typeof window != 'undefined' ;
104
115function scriptExists ( path ) {
126 const scripts = document . getElementsByTagName ( 'script' ) ;
You can’t perform that action at this time.
0 commit comments