Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 1f686c4

Browse files
jamesdailybtford
authored andcommitted
fix(docs.js): handle empty deps array for plunkr/jsfiddle
Change return value of docsApp.serviceFactory.prepareDefaultAppModule to include empty array `[]` instead of array containing one empty string element `['']`. This will correct script.js for simple plunkr/jsfiddle examples such as [ngChecked](http://docs.angularjs.org/api/ng.directive:ngChecked).
1 parent ba38de2 commit 1f686c4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/src/templates/js/docs.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,8 @@ docsApp.serviceFactory.prepareDefaultAppModule = function() {
359359
var moduleName = 'App';
360360
return {
361361
module : moduleName,
362-
script : "angular.module('" + moduleName + "', ['" + deps.join("','") + "']);\n\n"
362+
script : "angular.module('" + moduleName + "', [" +
363+
(deps.length ? "'" + deps.join("','") + "'" : "") + "]);\n\n"
363364
};
364365
};
365366
};

0 commit comments

Comments
 (0)