mirror of
https://github.com/gchq/CyberChef
synced 2025-03-13 21:36:56 +00:00
Added more error-handling to ToUpperCase()
This commit is contained in:
parent
2574a63975
commit
ed542582f9
1 changed files with 3 additions and 0 deletions
|
@ -37,6 +37,9 @@ class ToUpperCase extends Operation {
|
|||
* @returns {string}
|
||||
*/
|
||||
run(input, args) {
|
||||
if (!args || args.length === 0) {
|
||||
throw new OperationException("No capitalization scope was provided.");
|
||||
}
|
||||
const scope = args[0];
|
||||
if (scope === "All") {
|
||||
return input.toUpperCase();
|
||||
|
|
Loading…
Add table
Reference in a new issue