#49476: fix: second argument to shell.writeShortcutLink is optional
Merged
Description of Change
Closes #49469
Fixes an issue where shell.writeShortcutLink was throwing TypeError: Insufficient number of arguments when called with just [(path, options)] and no operation argument, even though the docs say operation should default to "create". Fix the argument parsing to check if the second argument is an object (options) or a string (operation), allowing the operation to be optional as expected.
Checklist
- PR description included
-
npm testpasses - tests are changed or added
- PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, and past tense.
Release Notes
Notes: Fixed an issue where shell.writeShortcutLink was throwing TypeError: Insufficient number of arguments when called with just [(path, options)].
Backports
Semver Impact
Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.
Semantic Versioning helps users understand the impact of updates:
- Major (X.y.z): Breaking changes that may require code modifications
- Minor (x.Y.z): New features that maintain backward compatibility
- Patch (x.y.Z): Bug fixes that don't change the API
- None: Changes that don't affect using facing parts of Electron