Skip to content

Commit

Permalink
fix improper initialization of Business hour manager on UI
Browse files Browse the repository at this point in the history
  • Loading branch information
murtaza98 committed Oct 17, 2023
1 parent 917a034 commit 2a32203
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/meteor/ee/app/livechat-enterprise/client/startup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ const businessHours: Record<string, IBusinessHourBehavior> = {
};

Meteor.startup(() => {
settings.onload('Livechat_business_hour_type', async (_, value) => {
Tracker.autorun(async () => {
const bhType = settings.get<string>('Livechat_business_hour_type');
if (await hasLicense('livechat-enterprise')) {
businessHourManager.registerBusinessHourBehavior(businessHours[(value as string).toLowerCase()]);
businessHourManager.registerBusinessHourBehavior(businessHours[bhType.toLowerCase()]);
}
});
});

0 comments on commit 2a32203

Please sign in to comment.