fix setPallette

previously accessing editorState var, undefined