Skip to content

Commit

Permalink
Fixed the frequent "cannot read undefined" error in console
Browse files Browse the repository at this point in the history
  • Loading branch information
rayzhuca committed Jan 27, 2024
1 parent a0d3ac2 commit 1e78e1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,7 @@ num current_zoom(bool is_main) => is_main ? current_zoom_main_js() : current_zoo

CssStyleSheet get_scadnano_stylesheet() {
for (var stylesheet in document.styleSheets) {
if (stylesheet.href.contains(constants.scadnano_css_stylesheet_name)) {
if (stylesheet.href != null && stylesheet.href.contains(constants.scadnano_css_stylesheet_name)) {
return stylesheet;
}
}
Expand Down

0 comments on commit 1e78e1e

Please sign in to comment.