Skip to content

Commit

Permalink
Merge pull request #10 from thisissoon/feature/fix-deleting-meta
Browse files Browse the repository at this point in the history
Fix: meta data being deleted when not specified in route
  • Loading branch information
edoparearyee committed Nov 25, 2015
2 parents 8bee9ad + 52e8b83 commit 3dac709
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions app/js/meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,8 @@ angular.module('sn.meta', ['ngRoute'])
current.$$route.meta[ $attrs[keyAttr] ]
) {
content = current.$$route.meta[ $attrs[keyAttr] ];
$element.attr('content', content);
}

$element.attr('content', content);
};

/**
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ describe('sn.meta:meta directive', function() {
}
})
expect(element.attr('content')).not.toEqual('some content');
expect(element.attr('content')).not.toEqual('');
expect(element.attr('content')).toEqual('Page description. No longer than 155 characters.');
});
});

Expand Down

0 comments on commit 3dac709

Please sign in to comment.