Skip to content

Commit

Permalink
refactor: remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ph1p committed Nov 16, 2019
1 parent 1fe0dad commit 8c7293c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,10 @@ main().then(({ roomName, secret, history, instanceId }) => {
postMessage(
'selection',
figma.currentPage.selection.map(n => n.id)
);
});
);
});

figma.ui.onmessage = async message => {
// await figma.clientStorage.setAsync('user-settings', {});
figma.ui.onmessage = async message => {
if (message.action === 'save-user-settings') {
await figma.clientStorage.setAsync('user-settings', message.payload);

Expand All @@ -84,7 +83,6 @@ main().then(({ roomName, secret, history, instanceId }) => {
figma.root.setPluginData(
'history',
JSON.stringify(history.concat(message.payload))
//(history || []).concat(message.payload)
);
}

Expand Down Expand Up @@ -112,7 +110,6 @@ main().then(({ roomName, secret, history, instanceId }) => {

postMessage('initialize', url || '');


const settings = await figma.clientStorage.getAsync('user-settings');

postMessage('root-data', {
Expand All @@ -122,7 +119,6 @@ main().then(({ roomName, secret, history, instanceId }) => {
instanceId,
settings
});

}

if (message.action === 'get-selection') {
Expand Down

0 comments on commit 8c7293c

Please sign in to comment.