File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -129,8 +129,9 @@ function parsePlistXML (node) {
129129 counter += 1 ;
130130 }
131131 if ( counter % 2 === 1 ) {
132- throw new Error ( 'Missing value for "' + key + '" while parsing <dict/>' ) ;
132+ new_obj [ key ] = '' ;
133133 }
134+
134135 return new_obj ;
135136
136137 } else if ( node . nodeName === 'array' ) {
Original file line number Diff line number Diff line change @@ -164,11 +164,10 @@ U=</data>
164164 parseFixture ( '<dict><key>a</key><key>b</key></dict>' ) ;
165165 } ) ;
166166 } ) ;
167-
168- it ( 'should throw if value is missing' , function ( ) {
169- assert . throws ( function ( ) {
170- parseFixture ( '<dict><key>a</key></dict>' ) ;
171- } ) ;
167+
168+ it ( 'should parse to empry string if value is missing' , function ( ) {
169+ var parsed = parseFixture ( '<dict><key>a</key></dict>' ) ;
170+ assert . deepEqual ( parsed , { 'a' : '' } ) ;
172171 } ) ;
173172
174173 it ( 'should parse an empty key' , function ( ) {
You can’t perform that action at this time.
0 commit comments