From e2d5d33ac77f816f666ee1c8bcbb32352b9a362c Mon Sep 17 00:00:00 2001 From: synth-ruiner Date: Wed, 27 Dec 2017 20:44:16 +0000 Subject: [PATCH] actually select the first palette on first run --- includes/script.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/script.js b/includes/script.js index eb0ad40..10ee0fc 100644 --- a/includes/script.js +++ b/includes/script.js @@ -161,6 +161,9 @@ $(document).ready(function() { if (_.find(bitsyData.palettes, {'id': palette.id})) { // user has already selected a palette, leave it be + // in case this is the first run: + palette = _.find(bitsyData.palettes, {'id': palette.id}) + // if we just set the palette to the newly imported palette with the same ID, // we will lose any changes the user has made to the palettes // is this a big issue considering that the palettes cannot be currently saved anyway?