app/assets/lookbook/js/components/copy.js in lookbook-0.5.0.beta.2 vs app/assets/lookbook/js/components/copy.js in lookbook-0.5.0
- old
+ new
@@ -1,8 +1,10 @@
-export default function copy(id) {
+export default function copy() {
return {
get content() {
- const target = document.getElementById(id);
+ const target = document.getElementById(
+ this.$root.getAttribute("data-target")
+ );
return (target ? target.innerHTML : "").trim();
},
done: false,
async save() {
await window.navigator.clipboard.writeText(this.content);