tohsakarat when using override, it's a form of monkey-patching, so you won't be able to use inheritance concepts like super
.
The override
helper function actually provides you the original method as the first parameter, so you would do something like this:
override(DiscussionPageResolver.prototype, 'onmatch', function (original, args, requestedPath, route) {
if (customLogic) {
// do custom logic
}
// Default to original logic
return original(args, requestedPath, route);
});
Even if you don't plan to call the original, you still need to account for it being the first parameter. This might explain why it doesn't work as intended if every parameter is switched with the next.