Skip to content

Commit

Permalink
i18nTools.findOccurrences: Do not skip JavaScript assets if number of…
Browse files Browse the repository at this point in the history
… incoming relations is 0
  • Loading branch information
Maarten Winter committed May 28, 2015
1 parent 42d8375 commit 0224300
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/i18nTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ i18nTools.findOccurrences = function (assetGraph, initialAssets) {
assetGraph.collectAssetsPostOrder(htmlAsset, {type: assetGraph.query.not(['HtmlAnchor', 'HtmlMetaRefresh', 'SvgAnchor'])}).forEach(function (asset) {
if (asset.isLoaded) {
if (asset.type === 'JavaScript') {
if (!asset.incomingRelations.every(isBootstrapperRelation)) {
if (asset.incomingRelations.length === 0 || !asset.incomingRelations.every(isBootstrapperRelation)) {
i18nTools.eachTrInAst(asset.parseTree, function (occurrence) {
occurrence.asset = asset;
(trOccurrencesByKey[occurrence.key] = trOccurrencesByKey[occurrence.key] || []).push(occurrence);
Expand Down

0 comments on commit 0224300

Please sign in to comment.