Skip to content

Conversation

@kevinjlope
Copy link
Contributor

Problem

Cannot read property 'clientWidth', this problem present in the section of Reports.

Solution

Added a try-catch in the method rerenderDataTable. This method is used to handle the dimensions of the reports' table.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 6, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Jul 6, 2021

Codecov Report

Merging #701 (fe687d2) into master (13de42e) will increase coverage by 2.14%.
The diff coverage is 96.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #701      +/-   ##
==========================================
+ Coverage   93.09%   95.23%   +2.14%     
==========================================
  Files          85      104      +19     
  Lines        1564     2100     +536     
  Branches      107      157      +50     
==========================================
+ Hits         1456     2000     +544     
+ Misses         67       57      -10     
- Partials       41       43       +2     
Impacted Files Coverage Δ
...nents/time-range-form/time-range-form.component.ts 100.00% <ø> (ø)
...time-entries-table/time-entries-table.component.ts 60.86% <50.00%> (+5.31%) ⬆️
src/app/modules/user/store/user.reducer.ts 62.50% <62.50%> (ø)
...ared/components/input-date/input-date.component.ts 66.66% <66.66%> (-2.57%) ⬇️
...dules/time-entries/pages/time-entries.component.ts 84.88% <82.85%> (+2.07%) ⬆️
...toggles/filters/feature-filter-provider.service.ts 93.33% <87.50%> (+15.55%) ⬆️
...project-list-hover/project-list-hover.component.ts 90.38% <92.00%> (+2.01%) ⬆️
.../components/project-list/project-list.component.ts 96.77% <93.75%> (+12.56%) ⬆️
src/app/modules/users/store/user.reducers.ts 94.73% <94.73%> (ø)
...ponents/details-fields/details-fields.component.ts 95.79% <95.58%> (+8.61%) ⬆️
... and 80 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e8b069e...fe687d2. Read the comment docs.


private rerenderDataTable(): void {
if (this.dtElement && this.dtElement.dtInstance) {
this.dtElement.dtInstance.then((dtInstance: DataTables.Api) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it is not a correct way to implement a try catch, you can use the if / else or else try / catch but not the two together.

I am attaching a link with information on the correct use of a try / catch.
https://javascript.plainenglish.io/the-dark-side-of-typescript-try-catch-deeded18ba0d

@kevinjlope kevinjlope closed this Jul 10, 2021
@bytesantiago bytesantiago deleted the TT-283-Don't-allow-clock-in-project-when-archive-a-customer-with-active-projects branch July 10, 2021 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants