File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -133,5 +133,8 @@ function walk_obj(next, next_child) {
133
133
// a typed array
134
134
next_child . ele ( 'data' ) . raw ( base64 . fromByteArray ( new Uint8Array ( next . buffer ) , next_child ) ) ;
135
135
136
+ } else if ( 'Null' === name ) {
137
+ next_child . ele ( 'null' ) . txt ( '' ) ;
138
+
136
139
}
137
140
}
Original file line number Diff line number Diff line change @@ -141,6 +141,19 @@ describe('plist', function () {
141
141
*/ } ) ) ;
142
142
} ) ;
143
143
144
+ it ( 'should not omit null values' , function ( ) {
145
+ var xml = build ( { a : null } ) ;
146
+ assert . strictEqual ( xml , multiline ( function ( ) { /*
147
+ <?xml version="1.0" encoding="UTF-8"?>
148
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
149
+ <plist version="1.0">
150
+ <dict>
151
+ <key>a</key>
152
+ <null/>
153
+ </dict>
154
+ </plist>
155
+ */ } ) ) ;
156
+ } ) ;
144
157
} ) ;
145
158
146
159
} ) ;
You can’t perform that action at this time.
0 commit comments