Skip to content

Commit 09b6396

Browse files
committed
1.0.15 - update overrides afterwards
1 parent 4dcf342 commit 09b6396

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

library-symbol-replacer.sketchplugin/Contents/Sketch/manifest.json

100755100644
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Library Symbol Replacer",
33
"identifier": "com.zeroheight.library-symbol-replacer",
4-
"version": "1.0.14",
4+
"version": "1.0.15",
55
"description": "replace local symbols with library symbols",
66
"authorEmail": "[email protected]",
77
"author": "zeroheight team",

library-symbol-replacer.sketchplugin/Contents/Sketch/script.js

100755100644
+3-3
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,15 @@ var replaceFromUrl = function(context,url){
100100
for(var i = 0 ; i < imports.length ; ++i){
101101
var obj = imports[i];
102102
// replace all local instances with the newly imported symbol, taking care to update
103-
// the overrides first
103+
// the overrides
104104
for(var j = 0 ; j < obj.localInstances.length ; ++j){
105+
obj.localInstances[j].changeInstanceToSymbol(obj.importedSymbol);
106+
105107
if(!MSLayerPaster.updateOverridesOnInstance_withIDMap_){
106108
obj.localInstances[j].updateOverridesWithObjectIDMap(idmap);
107109
}else{
108110
MSLayerPaster.updateOverridesOnInstance_withIDMap_(obj.localInstances[j], idmap);
109111
}
110-
111-
obj.localInstances[j].changeInstanceToSymbol(obj.importedSymbol);
112112
}
113113
}
114114

0 commit comments

Comments
 (0)