mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-23 15:45:45 +01:00
Make further use of default parameters.
--HG-- extra : rebase_source : ab666bce7ed7e47c8f1e2bc4145f553da990d319
This commit is contained in:
@@ -241,11 +241,13 @@ var IO = Module("io", {
|
||||
/**
|
||||
* Sets the current working directory.
|
||||
*
|
||||
* @param {string} newDir The new CWD. This may be a relative or
|
||||
* @param {File|string} newDir The new CWD. This may be a relative or
|
||||
* absolute path and is expanded by {@link #expandPath}.
|
||||
* @optional
|
||||
* @default = "~"
|
||||
*/
|
||||
set cwd(newDir) {
|
||||
newDir = newDir && newDir.path || newDir || "~";
|
||||
set cwd(newDir = "~") {
|
||||
newDir = newDir.path || newDir;
|
||||
|
||||
if (newDir == "-") {
|
||||
util.assert(this._oldcwd != null, _("io.noPrevDir"));
|
||||
|
||||
Reference in New Issue
Block a user