Skip to content

Commit 71bbcf8

Browse files
authored
Merge pull request #27 from vigneshsivaji/master
Need to resolve the issue occurs when run the JS public samples
2 parents 954f1d5 + 2d81a08 commit 71bbcf8

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Diff for: gulpfile.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,10 @@ function combineSampleList(platform, seo, done) {
285285
for (var i = 0; i < orderKeys.length; i++) {
286286
console.log('Category : ' + orderKeys[i]);
287287
var components = sampleOrder[orderKeys[i]];
288+
let category = orderKeys[i];
288289
for (var j = 0; j < components.length; j++) {
289290
console.log('Component : ' + components[j]);
290-
var currentData = getSamples(data, components[j]);
291+
var currentData = getSamples(data, components[j], category);
291292
currentData.order = i;
292293
result.push(currentData);
293294
}
@@ -349,11 +350,11 @@ function getSampleOrder(controls) {
349350
return controlWiseSampleOrder;
350351
}
351352

352-
function getSamples(data, component) {
353+
function getSamples(data, component, category) {
353354
var dataList = Object.keys(data);
354355
for (var i = 0; i < dataList.length; i++) {
355356
var currentData = data[dataList[i]];
356-
if (component === currentData.name) {
357+
if (component === currentData.name && category === currentData.category) {
357358
return currentData;
358359
}
359360
}

Diff for: src/common/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1208,13 +1208,13 @@ function setPropertySectionHeight() {
12081208

12091209
function routeDefault() {
12101210
crossroads.addRoute('', function () {
1211-
window.location.href = '#/' + selectedTheme + '/grid/gridoverview.html';
1211+
window.location.href = '#/' + selectedTheme + '/grid/grid-overview.html';
12121212
isInitRedirected = true;
12131213
});
12141214
crossroads.bypassed.add(function (request) {
12151215
var hash = request.split('.html')[0].split('/');
12161216
if (samplePath.indexOf(hash.slice(1).join('/')) === -1) {
1217-
location.hash = '#/' + hash[0] + '/' + (defaultSamples[hash[1]] || 'grid/gridoverview.html');
1217+
location.hash = '#/' + hash[0] + '/' + (defaultSamples[hash[1]] || 'grid/grid-overview.html');
12181218
isInitRedirected = true;
12191219
reloadPageForRedirection = true;
12201220
}

0 commit comments

Comments
 (0)