File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -189,19 +189,28 @@ pbxWriter.prototype.writeSectionComment = function (name, begin) {
189189}
190190
191191pbxWriter . prototype . writeSection = function ( section ) {
192- var id = section . id ,
193- comment = section [ id + '_comment' ] ,
194- object = section [ id ] ;
192+ var key , obj , cmt ;
193+
194+ // section should only contain objects
195+ for ( key in section ) {
196+ if ( COMMENT_KEY . test ( key ) ) continue ;
195197
196- this . write ( "%s /* %s */ = {\n" , id , comment ) ;
198+ cmt = comment ( key , section ) ;
199+ obj = section [ key ]
197200
198- this . indentLevel ++
201+ if ( cmt ) {
202+ this . write ( "%s /* %s */ = {\n" , key , cmt ) ;
203+ } else {
204+ this . write ( "%s = {\n" , key ) ;
205+ }
199206
200- this . writeObject ( object )
207+ this . indentLevel ++
201208
202- this . indentLevel --
209+ this . writeObject ( obj )
203210
204- this . write ( "};\n" ) ;
211+ this . indentLevel --
212+ this . write ( "};\n" ) ;
213+ }
205214}
206215
207216module . exports = pbxWriter ;
You can’t perform that action at this time.
0 commit comments