@@ -229,40 +229,20 @@ define(function (require, exports, module) {
229229 if ( serverEntitlements . plan . paidSubscriber ) {
230230 // Already a paid subscriber, return as-is
231231 return serverEntitlements ;
232- } else {
233- // Enhance entitlements for trial user
234- return {
235- ...serverEntitlements ,
236- plan : {
237- ...serverEntitlements . plan ,
238- paidSubscriber : true ,
239- name : brackets . config . main_pro_plan ,
240- validTill : Date . now ( ) + trialDaysRemaining * MS_IN_DAY
241- } ,
242- isInProTrial : true ,
243- trialDaysRemaining : trialDaysRemaining ,
244- entitlements : {
245- ...serverEntitlements . entitlements ,
246- liveEdit : {
247- activated : true ,
248- subscribeURL : brackets . config . purchase_url ,
249- upgradeToPlan : brackets . config . main_pro_plan ,
250- validTill : Date . now ( ) + trialDaysRemaining * MS_IN_DAY
251- }
252- }
253- } ;
254232 }
255- } else {
256- // Non-logged-in user with trial - return synthetic entitlements
233+ // Enhance entitlements for trial user
257234 return {
235+ ...serverEntitlements ,
258236 plan : {
237+ ...serverEntitlements . plan ,
259238 paidSubscriber : true ,
260239 name : brackets . config . main_pro_plan ,
261240 validTill : Date . now ( ) + trialDaysRemaining * MS_IN_DAY
262241 } ,
263242 isInProTrial : true ,
264243 trialDaysRemaining : trialDaysRemaining ,
265244 entitlements : {
245+ ...serverEntitlements . entitlements ,
266246 liveEdit : {
267247 activated : true ,
268248 subscribeURL : brackets . config . purchase_url ,
@@ -272,6 +252,25 @@ define(function (require, exports, module) {
272252 }
273253 } ;
274254 }
255+
256+ // Non-logged-in user with trial - return synthetic entitlements
257+ return {
258+ plan : {
259+ paidSubscriber : true ,
260+ name : brackets . config . main_pro_plan ,
261+ validTill : Date . now ( ) + trialDaysRemaining * MS_IN_DAY
262+ } ,
263+ isInProTrial : true ,
264+ trialDaysRemaining : trialDaysRemaining ,
265+ entitlements : {
266+ liveEdit : {
267+ activated : true ,
268+ subscribeURL : brackets . config . purchase_url ,
269+ upgradeToPlan : brackets . config . main_pro_plan ,
270+ validTill : Date . now ( ) + trialDaysRemaining * MS_IN_DAY
271+ }
272+ }
273+ } ;
275274 }
276275
277276 // Add functions to secure exports
0 commit comments