Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing saveAs button on toolbar #5

Open
fermelone opened this issue Apr 17, 2021 · 0 comments
Open

Fixing saveAs button on toolbar #5

fermelone opened this issue Apr 17, 2021 · 0 comments

Comments

@fermelone
Copy link

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/opencpq/dst/lib/root.js b/node_modules/opencpq/dst/lib/root.js
index bb0ab0b..b569992 100644
--- a/node_modules/opencpq/dst/lib/root.js
+++ b/node_modules/opencpq/dst/lib/root.js
@@ -3,7 +3,7 @@
 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
 
 var React = require("react");
-var saveAs = require("browser-filesaver");
+var FileSaver = require("file-saver");
 
 var _require = require('react-bootstrap');
 
@@ -145,7 +145,7 @@ var RootWidget = React.createClass({
 	},
 	_export: function _export() {
 		var blob = new Blob([JSON.stringify(this.state.now, null, 2)], { type: "application/json;charset=utf-8" });
-		saveAs(blob, "openCPQ.json");
+		FileSaver.saveAs(blob, "openCPQ.json");
 	},
 	render: function render() {
 		var _this3 = this;

This issue body was partially generated by patch-package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant