diff --git a/inc/class-dashboard-widgets.php b/inc/class-dashboard-widgets.php index 84385fe9..05825c01 100644 --- a/inc/class-dashboard-widgets.php +++ b/inc/class-dashboard-widgets.php @@ -74,6 +74,16 @@ public function enqueue_scripts(): void { return; } + /* + * The activity-stream widget is only registered on the network dashboard + * (wp_network_dashboard_setup). Skip enqueueing its assets on the regular + * per-site dashboard to avoid the Vue "Cannot find element: #activity-stream-content" + * console error. + */ + if ( ! is_network_admin()) { + return; + } + /* * The activity-stream widget view wraps its output in
, * which requires framework.css (registered as 'wu-styling'). The network admin