Skip to content

Commit c422bdf

Browse files
ENGCOM-8354: #30388 : fix js error on edit review page #30402
- Merge Pull Request #30402 from sunilit42/magento2:magento-2-4-develop - Merged commits: 1. af2d29a 2. e08499b 3. a4be3e0 4. a88f580 5. 7ea4721
2 parents 32ed03c + 7ea4721 commit c422bdf

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)