mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
parent
4ae3672633
commit
ca859cfdd5
@ -0,0 +1,45 @@
|
||||
"use strict";
|
||||
|
||||
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
||||
marko_component = {
|
||||
onCreate: function() {
|
||||
this.state = {
|
||||
message: "didnt run it"
|
||||
};
|
||||
|
||||
if (true) {
|
||||
runIt(() => {
|
||||
this.state.message = 'ran it';
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
marko_componentType = "/marko-test$1.0.0/components-compilation/fixtures-html/arrow-functions/index.marko",
|
||||
components_helpers = require("marko/src/components/helpers"),
|
||||
marko_renderer = components_helpers.r,
|
||||
marko_defineComponent = components_helpers.c,
|
||||
marko_helpers = require("marko/src/runtime/html/helpers"),
|
||||
marko_escapeXml = marko_helpers.x;
|
||||
|
||||
function runIt(fn) {
|
||||
fn()
|
||||
};
|
||||
|
||||
function render(input, out, __component, component, state) {
|
||||
var data = input;
|
||||
|
||||
out.w("<div>Broken [" +
|
||||
marko_escapeXml(state.message) +
|
||||
"]</div>");
|
||||
}
|
||||
|
||||
marko_template._ = marko_renderer(render, {
|
||||
___type: marko_componentType
|
||||
}, marko_component);
|
||||
|
||||
marko_template.Component = marko_defineComponent(marko_component, marko_template._);
|
||||
|
||||
marko_template.meta = {
|
||||
id: "/marko-test$1.0.0/components-compilation/fixtures-html/arrow-functions/index.marko",
|
||||
component: "./"
|
||||
};
|
||||
@ -0,0 +1,19 @@
|
||||
static {
|
||||
function runIt(fn) {
|
||||
fn()
|
||||
}
|
||||
}
|
||||
class {
|
||||
onCreate() {
|
||||
this.state = {
|
||||
message : "didnt run it"
|
||||
}
|
||||
if (true) {
|
||||
runIt(()=>{
|
||||
this.state.message = "ran it"
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
<div>Broken [${state.message}]</div>
|
||||
@ -0,0 +1 @@
|
||||
module.exports.fails = "issue #1181";
|
||||
Loading…
x
Reference in New Issue
Block a user