Skip to content

Commit

Permalink
Snapshot loading only use !== undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Oct 25, 2021
1 parent 1946bbb commit 17a0402
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/util/types/mst.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ export const FileLocation = types.snapshotProcessor(
// @ts-ignore
const { uri, localPath, blob } = rest
let locationType = ''
if (uri) {
if (uri !== undefined) {
locationType = 'UriLocation'
} else if (localPath) {
} else if (localPath !== undefined) {
locationType = 'LocalPathLocation'
} else if (blob) {
} else if (blob !== undefined) {
locationType = 'BlobLocation'
}

Expand Down

0 comments on commit 17a0402

Please sign in to comment.