Skip to content

Commit

Permalink
修复兼容性问题
Browse files Browse the repository at this point in the history
  • Loading branch information
evilbutcher committed Sep 20, 2020
1 parent 9882370 commit a9ee8da
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Checkin.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ function addTextToListWidget(text, listWidget) {
function addTitleTextToListWidget(text, listWidget) {
let item = listWidget.addText(text);
item.textColor = isDark ? Color.white() : Color.black();
item.applyHeadlineTextStyling();
try {
item.applyHeadlineTextStyling();
} catch(e) {
item.textSize = 18;
}
}

const scripts = [
Expand Down
6 changes: 5 additions & 1 deletion Dler Cloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ function addTextToListWidget(text, listWidget) {
function addTitleTextToListWidget(text, listWidget) {
let item = listWidget.addText(text);
item.textColor = isDark ? Color.white() : Color.black();
item.applyHeadlineTextStyling();
try {
item.applyHeadlineTextStyling();
} catch(e) {
item.textSize = 18;
}
}

const scripts = [
Expand Down

0 comments on commit a9ee8da

Please sign in to comment.