From e518bedab71819823409a02abea4c38c00a54387 Mon Sep 17 00:00:00 2001 From: Philip Harvey Date: Mon, 17 Jun 2019 10:54:37 -0700 Subject: [PATCH] Add override for Workflow editing Check if Preview resource revision is set indicating that we are editing a revision and not the actual page. --- .../resourceselectinput/js/inputs/resourceselect.input.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/components/resourceselectinput/js/inputs/resourceselect.input.js b/assets/components/resourceselectinput/js/inputs/resourceselect.input.js index 24b3738..a8508cb 100644 --- a/assets/components/resourceselectinput/js/inputs/resourceselect.input.js +++ b/assets/components/resourceselectinput/js/inputs/resourceselect.input.js @@ -18,7 +18,7 @@ this.filter = dom.find('.contentblocks-field-resourceselect input'); var contextkey = this.filter.data('contextkey'); var template = this.filter.data('template'); - var id = this.filter.data('id'); + var id = (Preview && Preview.resource && Preview.resource.isRevision) ? Preview.resource.isRevision : this.filter.data('id'); this.filter.on('keyup', $.proxy(function() { this.updateList(this.filter.val(),contextkey,template,id); this.select.prop("size", 10);