File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -39,9 +39,9 @@ export default class Server {
39
39
return Server . _getRequest ( "patterns/load" , { patternId :id } , ( data ) => this . _processPattern ( data ) ) ;
40
40
}
41
41
42
- static save ( pattern , fork ) {
42
+ static save ( pattern , fork , community ) {
43
43
// clone and prep the pattern object:
44
- let o = this . _prepPattern ( pattern , fork ) ;
44
+ let o = this . _prepPattern ( pattern , fork , community ) ;
45
45
return Server . _getRequest ( "patterns/save" , o , ( data ) => this . _processPattern ( data ) ) ;
46
46
}
47
47
@@ -105,12 +105,12 @@ export default class Server {
105
105
if ( o . tool && o . tool . id ) { o . tool . id = o . tool . id . toLowerCase ( ) ; }
106
106
}
107
107
108
- static _prepPattern ( o , fork ) {
108
+ static _prepPattern ( o , fork , community ) {
109
109
o = Utils . clone ( o ) ;
110
110
if ( fork ) {
111
111
o . parentId = o . id ;
112
112
delete ( o . id ) ;
113
- o . name = Utils . getForkName ( o . name ) ;
113
+ if ( ! community ) { o . name = Utils . getForkName ( o . name ) ; }
114
114
}
115
115
// clear null values:
116
116
if ( ! o . id ) { delete ( o . id ) ; }
Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ export default class Share extends EventDispatcher {
339
339
o . access = "public" ;
340
340
$ . addClass ( $ . query ( ".buttons" , this . communityEl ) , "wait" ) ;
341
341
this . comSaveStatus . distract ( ) ;
342
- Server . save ( o , true )
342
+ Server . save ( o , true , true )
343
343
. then ( ( data ) => this . _handleComSave ( data ) )
344
344
. catch ( ( err ) => this . _handleComSaveErr ( err ) ) ;
345
345
}
You can’t perform that action at this time.
0 commit comments