Skip to content

Commit

Permalink
fix: 修复InjectUpdate导致的异常报错问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Tokinx authored Dec 8, 2024
1 parent 73c6a2b commit d72fc50
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions inc/theme-update-checker.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,13 @@ public function onTransientUpdate( $value ) {
public function injectUpdate( $updates ) {
$state = get_option( $this->optionName );

//Is there an update to insert?
if ( ! empty( $state ) && isset( $state->update ) && ! empty( $state->update ) ) {
$updates->response[ $this->theme ] = $state->update->toWpFormat();
try {
// Is there an update to insert?
if ( ! empty( $state ) && isset( $state->update ) && ! empty( $state->update ) ) {
$updates->response[ $this->theme ] = $state->update->toWpFormat();
}
} catch (\Throwable $th) {
// throw $th;
}

return $updates;
Expand Down
4 changes: 2 additions & 2 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Description: Simple, smooth, data-driven, responsive WordPress theme
Author: Tokin
Author URI: https://biji.io
Version: 0.8.5
Version: 0.8.6
Tested up to: 5.9.3
Requires at least: 5.8
Requires PHP: 7.0
Expand Down Expand Up @@ -3422,7 +3422,7 @@ body .layout .container {
width: 92%;
margin: 0 auto;
}
body .layout .uni-bg, body .layout #notes .notes-tabbar, body .layout #aside #tab-nav:checked ~ .aside-tab .nav-active label, body .layout #aside #tab-toc:checked ~ .aside-tab .toc-active label {
body .layout .uni-bg, body .layout #notes .notes-tabbar.active, body .layout #aside #tab-nav:checked ~ .aside-tab .nav-active label, body .layout #aside #tab-toc:checked ~ .aside-tab .toc-active label {
background-color: rgba(255, 255, 255, 0.9);
transition: 300ms;
}
Expand Down

0 comments on commit d72fc50

Please sign in to comment.