Skip to content

Commit

Permalink
Do not redefine worker URL template variable if exists
Browse files Browse the repository at this point in the history
  • Loading branch information
rxu committed May 26, 2024
1 parent d4523cb commit 0beae0a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion event/listener.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ public function compatibility_notice()
*/
public function service_worker_url()
{
$this->template->assign_var('U_WEBPUSH_WORKER_URL', $this->controller_helper->route('phpbb_webpushnotifications_ucp_push_worker_controller'));
if (!$this->template->retrieve_var('U_WEBPUSH_WORKER_URL'))
{
$this->template->assign_var('U_WEBPUSH_WORKER_URL', $this->controller_helper->route('phpbb_webpushnotifications_ucp_push_worker_controller'));
}
}
}

0 comments on commit 0beae0a

Please sign in to comment.