Skip to content

Commit

Permalink
Merge branch 'hotfix/fix-undefined-path'
Browse files Browse the repository at this point in the history
  • Loading branch information
mistlog committed Jan 27, 2020
2 parents 05133e2 + 9219f3b commit 6b2b267
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typedraft",
"version": "0.1.9",
"version": "0.1.10",
"description": "TypeDraft is a superset of typescript with built-in support for DSL extension and literate programming.",
"keywords": [
"literate programming",
Expand Down
2 changes: 2 additions & 0 deletions source-view/code-object/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ As we are only interested in the draft part of a module, then we need a way to r
<ModuleCode /> +
function ToDraft(this: ModuleCode) {
let draft: Draft = [];
const that = this;
const visitor: Visitor = {
Program(path) {
that.m_Path = path;
path.get("body").forEach(path => {
<CreateDraft />;
});
Expand Down
2 changes: 2 additions & 0 deletions src/code-object/module.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,11 @@ As we are only interested in the draft part of a module, then we need a way to r
{
let draft: Draft = [];

const that = this;
const visitor: Visitor = {
Program(path)
{
that.m_Path = path;
path.get("body").forEach(path =>
{
//@ts-ignore
Expand Down

0 comments on commit 6b2b267

Please sign in to comment.