From 0cbf427ab50061b48c9027e63e9ee8a209946d37 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Mon, 9 Mar 2020 21:00:57 -0400 Subject: [PATCH] Update argument order --- ext/bg/js/audio-uri-builder.js | 4 ++-- ext/bg/js/backend.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/bg/js/audio-uri-builder.js b/ext/bg/js/audio-uri-builder.js index 80e9cb9a..15cea995 100644 --- a/ext/bg/js/audio-uri-builder.js +++ b/ext/bg/js/audio-uri-builder.js @@ -48,8 +48,8 @@ class AudioUriBuilder { return url; } - async getUri(mode, definition, options) { - const handler = this._getUrlHandlers.get(mode); + async getUri(definition, source, options) { + const handler = this._getUrlHandlers.get(source); if (typeof handler === 'function') { try { return await handler(definition, options); diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js index eb88a6c1..adc6f13d 100644 --- a/ext/bg/js/backend.js +++ b/ext/bg/js/backend.js @@ -515,7 +515,7 @@ class Backend { async _onApiAudioGetUri({definition, source, optionsContext}) { const options = this.getOptions(optionsContext); - return await this.audioUriBuilder.getUri(source, definition, options); + return await this.audioUriBuilder.getUri(definition, source, options); } _onApiScreenshotGet({options}, sender) { @@ -771,7 +771,7 @@ class Backend { } const options = this.getOptions(optionsContext); - return await this.audioUriBuilder.getUri(source, definition, options); + return await this.audioUriBuilder.getUri(definition, source, options); } async _audioInject(definition, fields, sources, optionsContext) {