Skip to content

Commit

Permalink
fix: just set the area if it is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRuf committed May 10, 2018
1 parent 3df51d4 commit 0dec988
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/code/Magento/Email/Model/AbstractTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -534,10 +534,9 @@ protected function cancelDesignConfig()
*/
public function setForcedArea($templateId)
{
if ($this->area) {
throw new \LogicException(__('Area is already set'));
if (!isset($this->area)) {
$this->area = $this->emailConfig->getTemplateArea($templateId);
}
$this->area = $this->emailConfig->getTemplateArea($templateId);
return $this;
}

Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/Theme/Model/Design/Config/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ private function getTemplateText($templateId, DesignConfigInterface $designConfi
if (is_numeric($templateId)) {
$template->load($templateId);
} else {
$template->setForcedArea($templateId);
$template->loadDefault($templateId);
}
$text = $template->getTemplateText();
Expand Down

0 comments on commit 0dec988

Please sign in to comment.