diff --git a/README.md b/README.md index d8065dd..c3d17df 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,7 @@ Replace symbols in the current document with symbols from a Library. Sketch 47 sees the introduction of Libraries, but migrating existing files to use Library symbols is one of the first big headaches. This plugin aims to help with that. ## Installation - -[Download zip](https://github.com/zeroheight/library-symbol-replacer/releases/download/v1.0.6/library-symbol-replacer.sketchplugin.zip), unzip and double click the `.sketchplugin` +[Download zip](https://github.com/zeroheight/library-symbol-replacer/releases/download/v1.0.7/library-symbol-replacer.sketchplugin.zip), unzip and double click the `.sketchplugin` ## Usage ### Preparing Libraries diff --git a/library-symbol-replacer.sketchplugin/Contents/Sketch/manifest.json b/library-symbol-replacer.sketchplugin/Contents/Sketch/manifest.json index 9bb10c8..83e0791 100755 --- a/library-symbol-replacer.sketchplugin/Contents/Sketch/manifest.json +++ b/library-symbol-replacer.sketchplugin/Contents/Sketch/manifest.json @@ -1,7 +1,7 @@ { "name": "Library Symbol Replacer", "identifier": "com.zeroheight.library-symbol-replacer", - "version": "1.0.6", + "version": "1.0.7", "description": "replace local symbols with library symbols", "authorEmail": "support@zeroheight.com", "author": "zeroheight team", diff --git a/library-symbol-replacer.sketchplugin/Contents/Sketch/script.js b/library-symbol-replacer.sketchplugin/Contents/Sketch/script.js index be1533d..7779d42 100755 --- a/library-symbol-replacer.sketchplugin/Contents/Sketch/script.js +++ b/library-symbol-replacer.sketchplugin/Contents/Sketch/script.js @@ -37,14 +37,12 @@ var replaceSymbols = function(context) { var localSymbol = localLookup[symbolName]; if(localSymbol){ var instances = localSymbol.allInstances(); - if(instances.length > 0){ - totalInstances += instances.length; - imports.push({ - localSymbol: localSymbol, - librarySymbol: librarySymbol, - localInstances: instances - }); - } + totalInstances += instances.length; + imports.push({ + localSymbol: localSymbol, + librarySymbol: librarySymbol, + localInstances: instances + }); } }