Skip to content

Commit 6f24086

Browse files
[EngCom] Public Pull Requests - 2.3-develop
- merged latest code from mainline branch
2 parents 5f6781f + ff6c326 commit 6f24086

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)