Skip to content

Commit

Permalink
Bail early if setting the template mode to the current template mode
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed May 14, 2019
1 parent 8d1dc09 commit 77a6280
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/web/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -1041,6 +1041,11 @@ public function getTemplateMode(): string
*/
public function setTemplateMode(string $templateMode)
{
// Ignore if it's already set to that
if ($templateMode === $this->_templateMode) {
return;
}

// Validate
if (!in_array($templateMode, [
self::TEMPLATE_MODE_CP,
Expand Down

0 comments on commit 77a6280

Please sign in to comment.