x-star-editor 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -235,7 +235,7 @@ var XStarEditor = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
235
235
  };
236
236
  }
237
237
  }, [fullscreen]);
238
- var _useState5 = useState(initialValue),
238
+ var _useState5 = useState(value !== null && value !== void 0 ? value : initialValue),
239
239
  _useState6 = _slicedToArray(_useState5, 2),
240
240
  sourceCode = _useState6[0],
241
241
  setSourceCode = _useState6[1];
@@ -25,7 +25,7 @@ var XStarMdEditor = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
25
25
  onInsertFile = _ref.onInsertFile;
26
26
  var containerRef = useRef(null);
27
27
  var container = useContainer(containerRef);
28
- var _useHistory = useHistory(initialValue, readOnly),
28
+ var _useHistory = useHistory(value !== null && value !== void 0 ? value : initialValue, readOnly),
29
29
  history = _useHistory.history,
30
30
  sourceCode = _useHistory.sourceCode,
31
31
  selection = _useHistory.selection,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x-star-editor",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "An editor developed by turingstar",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",