Skip to content

Commit

Permalink
fix router
Browse files Browse the repository at this point in the history
  • Loading branch information
joyqi committed Jan 4, 2024
1 parent 1c3b86f commit f23e825
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions var/Widget/Archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ protected function initParameter(Config $parameter)

/** 用于判断是路由调用还是外部调用 */
if (null == $parameter->type) {
if (!isset(Router::$current)) {
throw new WidgetException('Archive type is not set', 500);
}

$parameter->type = Router::$current;
} else {
$this->invokeFromOutside = true;
Expand Down

1 comment on commit f23e825

@joyqi
Copy link
Member Author

@joyqi joyqi commented on f23e825 Jan 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix #1681

Please sign in to comment.