@zelgadis87/utils-core 5.2.6 → 5.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/esbuild/index.mjs CHANGED
@@ -401,11 +401,11 @@ var Optional = class _Optional {
401
401
  }
402
402
  ifEmpty(callback) {
403
403
  if (this.isEmpty())
404
- callback();
404
+ return callback();
405
405
  }
406
406
  ifPresent(callback) {
407
407
  if (this.isPresent())
408
- callback(this.get());
408
+ return callback(this.get());
409
409
  }
410
410
  ifPresentThenClear(callback) {
411
411
  if (this.isPresent()) {
@@ -415,9 +415,9 @@ var Optional = class _Optional {
415
415
  }
416
416
  apply(callbackIfPresent, callbackIfEmpty) {
417
417
  if (this.isEmpty()) {
418
- callbackIfEmpty();
418
+ return callbackIfEmpty();
419
419
  } else {
420
- callbackIfPresent(this.get());
420
+ return callbackIfPresent(this.get());
421
421
  }
422
422
  }
423
423
  orElseReturn(newValue) {