Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overview tab: Fix javascript error #2414

Merged
merged 1 commit into from Feb 26, 2024

Conversation

jimtng
Copy link
Contributor

@jimtng jimtng commented Feb 26, 2024

The error:

app.30bb9074a7a632ce30a5.js:2 TypeError: Cannot read properties of undefined (reading 'length')
    at i.overviewPage (app.30bb9074a7a632ce30a5.js:2:1827039)
    at kn.get (app.30bb9074a7a632ce30a5.js:2:1405688)
    at kn.evaluate (app.30bb9074a7a632ce30a5.js:2:1406838)
    at i.overviewPage (app.30bb9074a7a632ce30a5.js:2:1408704)
    at i.pageStyle (app.30bb9074a7a632ce30a5.js:2:1827241)
    at kn.get (app.30bb9074a7a632ce30a5.js:2:1405688)
    at kn.evaluate (app.30bb9074a7a632ce30a5.js:2:1406838)
    at i.pageStyle (app.30bb9074a7a632ce30a5.js:2:1408704)
    at i.<anonymous> (app.30bb9074a7a632ce30a5.js:2:1827489)
    at e._render (app.30bb9074a7a632ce30a5.js:2:1414330)

Refactor overviewPage method to be easier to read.

@jimtng jimtng requested a review from a team as a code owner February 26, 2024 09:14
Refactor overviewPage method to be easier to read.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Copy link

relativeci bot commented Feb 26, 2024

Job #1685: Bundle Size — 11.01MiB (~+0.01%).

f635b8c(current) vs 3b694d2 main#1679(baseline)

Warning

Bundle contains 19 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
Job #1685
     Baseline
Job #1679
Regression  Initial JS 1.85MiB(~+0.01%) 1.85MiB
No change  Initial CSS 607.92KiB 607.92KiB
Change  Cache Invalidation 16.76% 22.84%
No change  Chunks 220 220
No change  Assets 242 242
No change  Modules 3088 3088
No change  Duplicate Modules 164 164
No change  Duplicate Code 1.77% 1.77%
No change  Packages 150 150
No change  Duplicate Packages 18 18
Bundle size by type  Change 1 change Regression 1 regression
                 Current
Job #1685
     Baseline
Job #1679
Regression  JS 9.2MiB (~+0.01%) 9.2MiB
Not changed  CSS 889.38KiB 889.38KiB
Not changed  Fonts 526.1KiB 526.1KiB
Not changed  Media 295.6KiB 295.6KiB
Not changed  IMG 140.74KiB 140.74KiB
Not changed  HTML 1.24KiB 1.24KiB
Not changed  Other 871B 871B

View job #1685 reportView jimtng:overview-tab-error branch activityView project dashboard

Copy link
Contributor

@florian-h05 florian-h05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix and the refactoring.
Normally „guard“ if-statements are nice thing, but if they are too many, the could becomes really unreadable, so thanks for the refactoring.

@florian-h05 florian-h05 added bug Something isn't working main ui Main UI labels Feb 26, 2024
@florian-h05 florian-h05 added this to the 4.2 milestone Feb 26, 2024
@florian-h05 florian-h05 changed the title Fix javascript error in overview-tab.vue Overview tab: Fix javascript error Feb 26, 2024
@florian-h05 florian-h05 merged commit e2738b5 into openhab:main Feb 26, 2024
6 checks passed
@jimtng jimtng deleted the overview-tab-error branch February 26, 2024 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working main ui Main UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants