From 911e6b98627fc62b472d08b350b70b616d4bb5c7 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Mon, 10 Dec 2018 16:08:10 -0800 Subject: [PATCH] CommonJS runtime fix --- src/lime/text/Font.hx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/lime/text/Font.hx b/src/lime/text/Font.hx index bc9670057..15298e8e4 100644 --- a/src/lime/text/Font.hx +++ b/src/lime/text/Font.hx @@ -19,7 +19,6 @@ import js.html.CanvasElement; import js.html.CanvasRenderingContext2D; import js.html.SpanElement; import js.Browser; -import js.Lib; #end #if (lime_cffi && !macro) @@ -70,13 +69,13 @@ class Font { if (!__init) { - #if js if (ascender == Lib.undefined) #end ascender = 0; - #if js if (descender == Lib.undefined) #end descender = 0; - #if js if (height == Lib.undefined) #end height = 0; - #if js if (numGlyphs == Lib.undefined) #end numGlyphs = 0; - #if js if (underlinePosition == Lib.undefined) #end underlinePosition = 0; - #if js if (underlineThickness == Lib.undefined) #end underlineThickness = 0; - #if js if (unitsPerEM == Lib.undefined) #end unitsPerEM = 0; + #if js if (ascender == untyped __js__("undefined")) #end ascender = 0; + #if js if (descender == untyped __js__("undefined")) #end descender = 0; + #if js if (height == untyped __js__("undefined")) #end height = 0; + #if js if (numGlyphs == untyped __js__("undefined")) #end numGlyphs = 0; + #if js if (underlinePosition == untyped __js__("undefined")) #end underlinePosition = 0; + #if js if (underlineThickness == untyped __js__("undefined")) #end underlineThickness = 0; + #if js if (unitsPerEM == untyped __js__("undefined")) #end unitsPerEM = 0; if (__fontID != null) {