Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

Commit

Permalink
Fixed crash when launching on new api
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyMakDes committed Mar 21, 2021
1 parent 810772c commit df28f9b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions AnimateMate.sketchplugin/Contents/Sketch/library/Utils.js
@@ -1,3 +1,4 @@
const Settings = require('sketch/settings');
@import 'library/easing.js';
@import 'library/Animate.js';

Expand Down Expand Up @@ -34,7 +35,6 @@ Utils.prototype.init = function (context, loopNestedGroups, forceContinue) {
this.page = this.doc.currentPage();
this.artboard = this.page.currentArtboard();
this.allLayersActive = false;
this.api = context.api();

if (this.artboard) {

Expand Down Expand Up @@ -88,12 +88,12 @@ Utils.prototype.init = function (context, loopNestedGroups, forceContinue) {


Utils.prototype.getKeyframeNumber = function() {
return this.api.settingForKey('AnimateMateFrame') || 0;
return Settings.settingForKey('AnimateMateFrame') || 0;
}

Utils.prototype.setKeyframeNumber = function(keyframe) {
log('saved keyframe'+ keyframe);
this.api.setSettingForKey('AnimateMateFrame', keyframe);
Settings.setSettingForKey('AnimateMateFrame', keyframe);
}

// ---------------------------------------- //
Expand Down

0 comments on commit df28f9b

Please sign in to comment.