Bacancy Technology
Bacancy Technology represents the connected world, offering innovative and customer-centric information technology experiences, enabling Enterprises, Associates and the Society to Rise™.
12+
Countries where we have happy customers
1050+
Agile enabled employees
06
World wide offices
12+
Years of Experience
05
Agile Coaches
14
Certified Scrum Masters
1000+
Clients projects
1458
Happy customers
Artificial Intelligence
Machine Learning
Salesforce
Microsoft
SAP
November 8, 2023
In order to resolve the error “TypeError: Cannot read property ‘getBoundingClientRect’ of null”, you’ll need to make some adjustments in your code. Specifically, ensure that ‘pdfWrapper’ exists and has a ‘current’ property before using it, as demonstrated in the below code snippet:
const setPdfSize = () => { // check if 'pdfWrapper' exists and has a 'current' property before using it if (pdfWrapper?.current) { setInitialWidth(pdfWrapper.current.getBoundingClientRect().width); } };