@@ -70,7 +70,7 @@ export default function(options, iframely_options, callback) {
7070
7171 var prefix = CONFIG . API_REQUEST_CACHE_PREFIX ? ( CONFIG . API_REQUEST_CACHE_PREFIX + ':' ) : '' ;
7272
73- var lang = iframely_options . getProviderOptions ( 'locale' ) ;
73+ var lang = iframely_options ? .getProviderOptions ( 'locale' ) ;
7474 if ( lang ) {
7575 prefix += lang + ':' ;
7676 }
@@ -94,13 +94,13 @@ export default function(options, iframely_options, callback) {
9494 }
9595
9696 if ( error ) {
97- iframely_options . registerFetchError ( {
97+ iframely_options ? .registerFetchError ( {
9898 source : 'api' ,
9999 url : options . uri ,
100100 error : error
101101 } ) ;
102102 } else if ( result && result . status !== 200 ) {
103- iframely_options . registerFetchError ( {
103+ iframely_options ? .registerFetchError ( {
104104 source : 'api' ,
105105 url : options . uri ,
106106 status_code : result . status
@@ -153,7 +153,7 @@ export default function(options, iframely_options, callback) {
153153 } ) ;
154154 }
155155
156- iframely_options . registerFetch ( {
156+ iframely_options ? .registerFetch ( {
157157 source : 'api' ,
158158 url : options . uri
159159 } ) ;
@@ -171,7 +171,7 @@ export default function(options, iframely_options, callback) {
171171 }
172172
173173 // Ignore proxy.cache_ttl, if options.cache_ttl === 0 - do not read from cache.
174- if ( iframely_options . cache_ttl === 0 ) {
174+ if ( iframely_options ? .cache_ttl === 0 ) {
175175
176176 if ( useCacheOnly ) {
177177
@@ -197,7 +197,7 @@ export default function(options, iframely_options, callback) {
197197 }
198198 }
199199
200- iframely_options . registerFetch ( {
200+ iframely_options ? .registerFetch ( {
201201 source : 'cache' ,
202202 url : options . uri
203203 } ) ;
0 commit comments