Skip to content

Commit

Permalink
Merge pull request #1425 from magento-engcom/develop-prs
Browse files Browse the repository at this point in the history
[EngCom] Public Pull Requests
 - MAGETWO-71743: Removed instantiating new driverpool class when it's already available. #10590
 - MAGETWO-71742: Changed typos in class comment #10589
 - MAGETWO-71705: fixed notice when remove column from grid #10579
 - MAGETWO-71670: Fix issue #10565 #10575
  • Loading branch information
ishakhsuvarov authored Aug 19, 2017
2 parents adb30ab + 16006c5 commit d48faba
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion app/code/Magento/Backend/Block/Widget/Grid/Extended.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,8 @@ public function removeColumn($columnId)
if ($this->getColumnSet()->getChildBlock($columnId)) {
$this->getColumnSet()->unsetChild($columnId);
if ($this->_lastColumnId == $columnId) {
$this->_lastColumnId = array_pop($this->getColumnSet()->getChildNames());
$names = $this->getColumnSet()->getChildNames();
$this->_lastColumnId = array_pop($names);
}
}
return $this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ define([
* @param {Array} data - current component value
*/
setPrepareToSendData: function (data) {
if (!data.length) {
if (_.isUndefined(data) || !data.length) {
data = '';
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ define([
expect(obj.source.set).toHaveBeenCalledWith(dataScope + '-prepared-for-send', '');
});

it('Check method call with undefined as parameter.', function () {

expect(obj.setPrepareToSendData(undefined)).toBeUndefined();
expect(obj.source.set).toHaveBeenCalledWith(dataScope + '-prepared-for-send', '');
});

it('Check method call with array with data as parameter.', function () {
expect(obj.setPrepareToSendData(['1', '2', '3'])).toBeUndefined();
expect(obj.source.set).toHaveBeenCalledWith(dataScope + '-prepared-for-send', ['1', '2', '3']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ protected function _loadPrimaryConfig(DirectoryList $directoryList, $driverPool,
new \Magento\Framework\Filesystem\Directory\WriteFactory($driverPool)
),
new \Magento\Framework\Config\FileIteratorFactory(
new \Magento\Framework\Filesystem\File\ReadFactory(new \Magento\Framework\Filesystem\DriverPool())
new \Magento\Framework\Filesystem\File\ReadFactory($driverPool)
)
);
$schemaLocator = new \Magento\Framework\ObjectManager\Config\SchemaLocator();
Expand Down
6 changes: 3 additions & 3 deletions lib/internal/Magento/Framework/Filesystem/DirectoryList.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
/**
* Application file system directories dictionary
* Application file system directories dictionary.
*
* Provides information about what directories are available in the application
* Serves as customizaiton point to specify different directories or add own
* Provides information about what directories are available in the application.
* Serves as a customization point to specify different directories or add your own.
*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
Expand Down

0 comments on commit d48faba

Please sign in to comment.