Skip to content

Commit 1365265

Browse files
committed
1.0.14 - ensure overrides are actually changed
1 parent 8982376 commit 1365265

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

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

+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.13",
4+
"version": "1.0.14",
55
"description": "replace local symbols with library symbols",
66
"authorEmail": "[email protected]",
77
"author": "zeroheight team",

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,10 @@ var replaceFromUrl = function(context,url){
9090
var importedSymbol = librariesController().importForeignSymbol_fromLibrary_intoDocument_(
9191
obj.librarySymbol, library, documentData);
9292

93+
obj.importedSymbol = importedSymbol.symbolMaster();
94+
9395
var localID = String(obj.localSymbol.symbolID());
94-
var foreignID = String(importedSymbol.symbolMaster().symbolID());
96+
var foreignID = String(obj.importedSymbol.symbolID());
9597
idmap[localID] = foreignID;
9698
}
9799

@@ -105,6 +107,8 @@ var replaceFromUrl = function(context,url){
105107
}else{
106108
MSLayerPaster.updateOverridesOnInstance_withIDMap_(obj.localInstances[j], idmap);
107109
}
110+
111+
obj.localInstances[j].changeInstanceToSymbol(obj.importedSymbol);
108112
}
109113
}
110114

0 commit comments

Comments
 (0)