<commit_before>import Bluebird from 'bluebird';

import {createLogin} from '../widgets/login';

import Editor from '../components/editor';

import ComponentStack from '../lib/componentStack';
import Widget from '../lib/widget';
import dedent from '../lib/dedent';

class EditorWidget extends Widget {
    constructor(options) {
        super(Editor, options);

        this.on('save', options.onSave);
    }

    save(cb) {
        return Bluebird.resolve(this.onSave)
            .then(function (result) {
                if(cb)
                    cb(result);<commit_msg>Fix editor.onSave<commit_after>import Bluebird from 'bluebird';

import {createLogin} from '../widgets/login';

import Editor from '../components/editor';

import ComponentStack from '../lib/componentStack';
import Widget from '../lib/widget';
import dedent from '../lib/dedent';

class EditorWidget extends Widget {
    constructor(options) {
        super(Editor, options);

        this.onSave = options.onSave;

        this.on('save', this.onSave);
    }

    save(cb) {
        return Bluebird.resolve(this.onSave())
            .then(function (result) {
                if(cb)
                    cb(result);
{'fraction_non_alphanumeric': 0.13552188552188552, 'fraction_numerical': 0.0, 'mean_word_length': 2.5492537313432835, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '315987', 'n_tokens_mistral': 332, 'n_tokens_neox': 324, 'n_words': 82}