Skip to content

Commit 8c2e01f

Browse files
author
Magento Team
committed
Merge branch '2.2-develop' of https://github.com/magento/magento2ce into 2.2.4-preview
2 parents 1b54208 + dcd8bcb commit 8c2e01f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

app/code/Magento/RequireJs/Model/FileManager.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ public function createBundleJsPool()
183183
}
184184

185185
foreach ($libDir->read($bundleDir) as $bundleFile) {
186+
if (pathinfo($bundleFile, PATHINFO_EXTENSION) !== 'js') {
187+
continue;
188+
}
186189
$relPath = $libDir->getRelativePath($bundleFile);
187190
$bundles[] = $this->assetRepo->createArbitrary($relPath, '');
188191
}

app/code/Magento/RequireJs/Test/Unit/Model/FileManagerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public function testCreateBundleJsPool()
153153
->expects($this->once())
154154
->method('read')
155155
->with('path/to/bundle/dir/js/bundle')
156-
->willReturn(['bundle1.js', 'bundle2.js']);
156+
->willReturn(['bundle1.js', 'bundle2.js', 'some_file.not_js']);
157157
$dirRead
158158
->expects($this->exactly(2))
159159
->method('getRelativePath')

0 commit comments

Comments
 (0)