File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -7,12 +7,22 @@ import * as config from "./lib/config.js";
77import * as story from "./lib/story.js" ;
88
99async function distributeZones ( locker ) {
10- const subscriber = locker . user . isSubscriber ( ) ;
10+ let subscriber , dma ;
11+
12+ // DSP limited to production domains
13+ try {
14+ subscriber = locker . user . isSubscriber ( ) ;
15+ dma = await locker . user . isInDMA ( ) ;
16+ } catch ( e ) {
17+ subscriber = false ;
18+ dma = false
19+ console . warn ( "DSP is not available" ) ;
20+ }
1121
1222 // Setup
1323 zones . setLocker ( locker ) ;
1424 zones . setConfig ( "subscriber" , subscriber ) ;
15- zones . setConfig ( "dma" , subscriber ? true : await locker . user . isInDMA ( ) ) ;
25+ zones . setConfig ( "dma" , subscriber ? true : dma ) ;
1626 zones . setConfig ( "ads" , locker . getYozonsLocker ( "core" ) . areAdsAllowed ( ) ) ;
1727
1828 // Config files
Original file line number Diff line number Diff line change 11{
22 "name" : " @mcclatchy/zones" ,
3- "version" : " 1.10.0 " ,
3+ "version" : " 1.10.1 " ,
44 "description" : " A Yozons extension to dynamically distribute or re-distribute zones on the websites." ,
55 "main" : " index.js" ,
66 "directories" : {
You can’t perform that action at this time.
0 commit comments