Refactor the job xhrKey to use super

This commit is contained in:
Michael Lange 2018-05-25 09:15:45 -07:00
parent 9c6b060de9
commit 1078a99948
1 changed files with 3 additions and 2 deletions

View File

@ -47,11 +47,12 @@ export default Watchable.extend({
}, },
xhrKey(url, method, options = {}) { xhrKey(url, method, options = {}) {
const plainKey = this._super(...arguments);
const namespace = options.data && options.data.namespace; const namespace = options.data && options.data.namespace;
if (namespace) { if (namespace) {
return `${method} ${url}?namespace=${namespace}`; return `${plainKey}?namespace=${namespace}`;
} }
return `${method} ${url}`; return plainKey;
}, },
relationshipFallbackLinks: { relationshipFallbackLinks: {