Skip to content

Commit 8990635

Browse files
ENGCOM-8354: #30388 : fix js error on edit review page #30402
2 parents 68c903f + c422bdf commit 8990635

File tree

1 file changed

+9
-3
lines changed
  • app/code/Magento/Review/Block/Adminhtml

1 file changed

+9
-3
lines changed

app/code/Magento/Review/Block/Adminhtml/Edit.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,16 @@ protected function _construct()
220220
);
221221
}
222222
}
223-
Event.observe(window, \'load\', function(){
224-
Event.observe($("select_stores"), \'change\', review.updateRating);
225-
});
226223
';
224+
if (!$this->_storeManager->hasSingleStore()) {
225+
$this->_formInitScripts[] = '
226+
require(["jquery","prototype"], function(jQuery){
227+
Event.observe(window, \'load\', function(){
228+
Event.observe($("select_stores"), \'change\', review.updateRating);
229+
});
230+
})
231+
';
232+
}
227233
}
228234

229235
/**

0 commit comments

Comments
 (0)