From 150295ec4fd0c232b418d9f7af1ab9b37b9ca02e Mon Sep 17 00:00:00 2001 From: Danny Miller Date: Mon, 2 Nov 2015 11:16:01 -0500 Subject: [PATCH] File type was always being set to null as it was coded. Updated to allow the regex match to always run. --- lib/resources/js/controllers/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/resources/js/controllers/index.js b/lib/resources/js/controllers/index.js index 0c5ac8f..f0f39e1 100755 --- a/lib/resources/js/controllers/index.js +++ b/lib/resources/js/controllers/index.js @@ -124,7 +124,7 @@ angular.module('docular.controllers', [ $scope.isIndex = true; } else { sourceService.fetchSourceFile(documentationItem.file).then(function (resp) { - var fileType = fileType ? documentationItem.file.match(/[A-Za-z0-9]+$/) : null; + var fileType = documentationItem.file.match(/[A-Za-z0-9]+$/); if(fileType && fileType.length == 1) { fileType = fileType[0]; } else { @@ -133,7 +133,7 @@ angular.module('docular.controllers', [ $scope.source = { content: resp.data, fileType: fileType - } + }; console.log($scope.source); });