Skip to content

Commit 3305feb

Browse files
committed
Stop "(fork)" appended to community names
1 parent c454381 commit 3305feb

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

dev/src/net/Server.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ export default class Server {
3939
return Server._getRequest("patterns/load", {patternId:id}, (data) => this._processPattern(data));
4040
}
4141

42-
static save(pattern, fork) {
42+
static save(pattern, fork, community) {
4343
// clone and prep the pattern object:
44-
let o = this._prepPattern(pattern, fork);
44+
let o = this._prepPattern(pattern, fork, community);
4545
return Server._getRequest("patterns/save", o, (data) => this._processPattern(data));
4646
}
4747

@@ -105,12 +105,12 @@ export default class Server {
105105
if (o.tool && o.tool.id) { o.tool.id = o.tool.id.toLowerCase(); }
106106
}
107107

108-
static _prepPattern(o, fork) {
108+
static _prepPattern(o, fork, community) {
109109
o = Utils.clone(o);
110110
if (fork) {
111111
o.parentId = o.id;
112112
delete(o.id);
113-
o.name = Utils.getForkName(o.name);
113+
if (!community) { o.name = Utils.getForkName(o.name); }
114114
}
115115
// clear null values:
116116
if (!o.id) { delete(o.id); }

dev/src/views/Share.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ export default class Share extends EventDispatcher {
339339
o.access = "public";
340340
$.addClass($.query(".buttons", this.communityEl), "wait");
341341
this.comSaveStatus.distract();
342-
Server.save(o, true)
342+
Server.save(o, true, true)
343343
.then((data) => this._handleComSave(data))
344344
.catch((err) => this._handleComSaveErr(err));
345345
}

0 commit comments

Comments
 (0)