If you are going to make any code changes to your site created using the DIVI THEME and you want trouble free updates you should create a CHILD THEME.
Elegant Themes have a guide on how to create this CHILD THEME on their website at https://www.elegantthemes.com/blog/divi-resources/divi-child-theme
We have created this basic child theme for you. Just download it and install like a normal theme. You need to install the Divi Theme First !
To add the child theme download it first then goto APPEARANCES > THEMES > ADD NEW select UPLOAD THEME and select the downloaded theme and install now.