File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,9 @@ export default Service.extend({
6262 if ( ! didConfigure ) {
6363 let publishableKey = this . get ( 'publishableKey' ) ;
6464
65+ if ( ! publishableKey ) {
66+ throw new Error ( "stripev3: Missing Stripe key, please set `ENV.stripe.publishableKey` in config.environment.js" ) ;
67+ }
6568
6669 let stripe = new Stripe ( publishableKey ) ;
6770 let functions = getProperties ( stripe , STRIPE_FUNCTIONS ) ;
Original file line number Diff line number Diff line change 1- import EmberError from '@ember/error' ;
21import config from '../config/environment' ;
32import StripeMock from 'ember-stripe-elements/utils/stripe-mock' ;
43
@@ -9,10 +8,6 @@ export function initialize() {
98 application . register ( 'config:stripe' , stripeConfig , { instantiate : false } ) ;
109 application . inject ( 'service:stripev3' , 'config' , 'config:stripe' ) ;
1110
12- if ( ! stripeConfig . publishableKey ) {
13- throw new EmberError ( "stripev3: Missing Stripe key, please set `ENV.stripe.publishableKey` in config.environment.js" ) ;
14- }
15-
1611 if ( typeof FastBoot !== 'undefined' || stripeConfig . mock ) {
1712 window . Stripe = StripeMock ;
1813 }
You can’t perform that action at this time.
0 commit comments