Skip to content

Commit

Permalink
simply code
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanocudini committed Apr 1, 2018
1 parent 1c79019 commit fc744aa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/core/modules/Plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@ Kepler.Plugin = function(plugin) {

Kepler.Plugin.templatesByPlaceholder = function(placeholderName, placeholderData) {
var tmpls = [];

if(!placeholderName) return tmpls;

for(var parentName in K.templates) {

if(parentName === placeholderName) {

K.templates[parentName] = _.sortBy(K.templates[parentName],'order');

_.chain(K.templates[parentName])
.sortBy('order')
.pluck('name')
.each(function(name) {
if(Template[name]) {
Expand Down

0 comments on commit fc744aa

Please sign in to comment.