Skip to content
This repository was archived by the owner on Feb 1, 2018. It is now read-only.

Commit da9f6d7

Browse files
committed
Fix and release v0.2.15
1 parent 5b3a375 commit da9f6d7

5 files changed

Lines changed: 27 additions & 29 deletions

File tree

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docbase",
3-
"version": "0.2.13",
3+
"version": "0.2.14",
44
"homepage": "https://github.com/appbaseio/Docbase",
55
"authors": [
66
"Henrique Sa <[email protected]>",

dist/main.js

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,11 @@
157157
}
158158
for (var v in versions) {
159159
var version = versions[v];
160-
if(version !== null)
161-
version.forEach(folderIn);
160+
if (version !== null) {
161+
for (var i = 0; i < version.length; i++) {
162+
folderIn(version[i]);
163+
}
164+
}
162165
}
163166
return versions;
164167
};
@@ -394,14 +397,8 @@
394397
retObj.locationPath = location.path;
395398

396399
//If index file
397-
if (typeof($route.current.params.file) === 'undefined') {
398-
$location.path(retObj.locationPath);
399-
}
400400

401-
var pathCheck = location.path.split('/');
402-
var lastPath = pathCheck[pathCheck.length-1];
403-
404-
if ($route.current.params.file === 'index' || lastPath === 'index') {
401+
if ($route.current.params.file === 'index') {
405402
retObj.index = true;
406403
retObj.currentFolder = $route.current.params.folder;
407404
deferred.resolve(retObj);
@@ -501,7 +498,7 @@
501498
$scope.github = data.github;
502499
$scope.navbarHtml = Docbase.options.navbarHtml;
503500
$scope.logoSrc = Docbase.options.logoSrc;
504-
501+
505502
function versionIn(folder) {
506503
if (folder.name === data.currentFolder) {
507504
$scope.indexList = folder.files;
@@ -515,8 +512,10 @@
515512

516513
for (var version in data.map) {
517514
if (version === data.currentVersion) {
518-
if(data.map[version] !== null)
519-
data.map[version].forEach(versionIn);
515+
if (data.map[version] !== null)
516+
for (var j = 0; j < data.map[version].length; j++) {
517+
versionIn(data.map[version][j]);
518+
}
520519
}
521520
}
522521
} else {
@@ -640,7 +639,7 @@
640639
})[0];
641640

642641
// allow files in TL menu
643-
file = file || (folderObj.files && 'index');
642+
file = file || (folderObj.files && folderObj.files[0].name);
644643
var path = '/' + version + '/' + folder + '/' + file;
645644
if (typeof(file) === "undefined")
646645
path = '/' + version + '/' + folder;

0 commit comments

Comments
 (0)