Skip to content

Commit

Permalink
REFACTOR: optimized code with null check (#395)
Browse files Browse the repository at this point in the history
  • Loading branch information
OutdatedGuy committed Jul 24, 2022
1 parent 563612b commit a4f90d6
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/templates.dart
Expand Up @@ -519,14 +519,8 @@ const List<String> _indexHtmlBrandingPicture = [

const String _webJS = '''
function removeSplashFromWeb() {
const elem = document.getElementById("splash");
if (elem) {
elem.remove();
}
const elem2 = document.getElementById("splash-branding");
if (elem2) {
elem2.remove();
}
document.getElementById("splash")?.remove();
document.getElementById("splash-branding")?.remove();
document.body.style.background = "transparent";
}
''';

0 comments on commit a4f90d6

Please sign in to comment.