diff --git a/CHANGELOG.md b/CHANGELOG.md index 68a2e21..bfc4bd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [3.0.2] - 2019-08-30 + +### Fixed +- Default standard when none is provided. + ## [3.0.1] - 2019-08-30 ### Security diff --git a/package-lock.json b/package-lock.json index 6552eea..f02d42d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "secure-rm", - "version": "3.0.1", + "version": "3.0.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 3ad4137..4dee823 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "secure-rm", - "version": "3.0.1", + "version": "3.0.2", "description": "Completely erases files by making recovery impossible.", "main": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/src/secure-rm.ts b/src/secure-rm.ts index b88d60e..8ec01f8 100644 --- a/src/secure-rm.ts +++ b/src/secure-rm.ts @@ -31,7 +31,7 @@ export function unlink(path: string, options?: Options | Callback, callback?: Ca options = { standard: 'secure' } } // Define standard if none is provided - if (typeof (options as Options).standard === undefined) (options as Options).standard = 'secure' + if ((options as Options).standard === undefined) (options as Options).standard = 'secure' if (callback) unlinkCallback(path, options as ParsedOptions, (err: NodeJS.ErrnoException | null, path: string) => callback!(err, path)) else return unlinkPromise(path, options as ParsedOptions)