File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " libexif-wasm " : patch
3+ ---
4+
5+ chore: update ExifData to never return null to match implementation
Original file line number Diff line number Diff line change @@ -131,26 +131,26 @@ class ExifData extends ExifDataStruct implements DisposableDataSegment {
131131 /**
132132 * This was a function in the original API
133133 */
134- get dataType ( ) : DataType | null {
134+ get dataType ( ) : DataType {
135135 const dataType = ExifDataTypeBiMap . getKey (
136136 exif_data_get_data_type ( this . byteOffset ) as ExifDataTypeValue ,
137137 ) ;
138138
139139 if ( dataType === undefined ) {
140140 throw new Error ( "exif_data_get_data_type returned an invalid DataType" ) ;
141141 } else if ( dataType === "COUNT" ) {
142- return null ;
142+ return "UNKNOWN" ; // COUNT and UNKNOWN have the same value
143143 }
144144 return dataType ;
145145 }
146146
147147 /**
148148 * This was a function in the original API
149149 */
150- set dataType ( dt : DataType | null ) {
150+ set dataType ( dt : DataType ) {
151151 assertEnumObjectKey ( ExifDataType , dt ) ;
152152
153- exif_data_set_data_type ( this . byteOffset , ExifDataType [ dt ?? "COUNT " ] ) ;
153+ exif_data_set_data_type ( this . byteOffset , ExifDataType [ dt ?? "UNKNOWN " ] ) ;
154154 }
155155
156156 static new ( ) {
You can’t perform that action at this time.
0 commit comments