Skip to content

Fix for new Function calls - #36

Closed
liborm85 wants to merge 1 commit into
masterfrom
csp-fix
Closed

Fix for new Function calls#36
liborm85 wants to merge 1 commit into
masterfrom
csp-fix

Conversation

@liborm85

Copy link
Copy Markdown
Contributor

Fixes#28

@liborm85liborm85 mentioned this pull request Apr 16, 2020
@blikblum

Copy link
Copy Markdown
Member

Hi i take a look at the code and it can be simplified a bit:

constructor(type,versions={}){super();this.type=type;this.versions=versions;}decode(stream,parent,length=0){constres=this._setup(stream,parent,length);if(typeofthis.type==='string'){res.version=parent[this.type];}else{res.version=this.type.decode(stream);}

Instead of calling versionGetter method, do the operation inline. versionSetter is not used at all.

Did not test because internet connection is far from great where i am.

Feel free to use it

@liborm85

Copy link
Copy Markdown
ContributorAuthor

New PR #37
Tests passed. Thanks.

@liborm85
liborm85 deleted the csp-fix branch April 18, 2020 08:51
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unusable with CSP directives

2 participants

@liborm85@blikblum