Skip to content

Commit 7810d7a

Browse files
authored
Merge pull request #667 from plotly/dashboard-search-fix
Devtools: Fix mock-file filter function
2 parents 3c85d9e + 9c8d58b commit 7810d7a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

devtools/test_dashboard/server.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ function readFiles(files) {
7474
function createMocksList(files) {
7575

7676
// eliminate pollutants (e.g .DS_Store) that can accumulate in the mock directory
77-
var jsonFiles = files.filter(function(file) {return file.extname === '.json';});
77+
var jsonFiles = files.filter(function(file) {
78+
return file.name.substr(-5) === '.json';
79+
});
7880

7981
var mocksList = jsonFiles.map(function(file) {
8082
var contents = JSON.parse(file.contents);

0 commit comments

Comments
 (0)