Name: [FIX] viin_brand_pos: guard company service in POS Navbar favicon patch

State: Killed

PR State: merged

PR Author: Roy Le

PR Author Email:

PR: #650

Committer: Roy Le

Committer Email: roy.le@viindoo.com

Commit: 1f28b94262569a55b0d41a21f761c909f3495f5d

Description:

                                            [FIX] viin_brand_pos: guard company service in POS Navbar favicon patch

The POS Navbar patch read this.env.services.company.currentCompany.id
unconditionally in setup() to set the branded favicon. The company
service is not registered in the bare point_of_sale QUnit test env, so
this.env.services.company was undefined and .currentCompany threw
"Cannot read properties of undefined (reading 'currentCompany')" in
Navbar.setup -> the whole POS Chrome mount failed, failing
point_of_sale:WebSuite.test_pos_js ("mount the Chrome").

Optional-chain the service and bail out when there is no current company
(no branded favicon to set). Real POS is unaffected.

Verified: point_of_sale:WebSuite.test_pos_js passes (0 failed) on a focused point_of_sale+viin_brand_pos install with the guard.
                                            

Branch: 17.0

Instance ID: 0

Age:

Up-time: Not finished