From 5468b2b3c060a538f92999dcb0a46bccf1f9cee0 Mon Sep 17 00:00:00 2001
From: anekos
Date: Mon, 1 Mar 2010 12:23:13 +0000
Subject: プラグインパスが見つからない場合は、echoerr
した上で続行するようにした
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@36890 d0d07461-0603-4401-acd4-de1884942a52
---
_libly.js | 34 ++++++++++++++++++----------------
1 file changed, 18 insertions(+), 16 deletions(-)
(limited to '_libly.js')
diff --git a/_libly.js b/_libly.js
index 11d3fa8..a966b78 100755
--- a/_libly.js
+++ b/_libly.js
@@ -12,7 +12,7 @@ var PLUGIN_INFO =
適当なライブラリっぽいものたち。
suVene
MIT
- 0.1.30
+ 0.1.31
2.3pre
2.3pre
http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/_libly.js
@@ -252,21 +252,23 @@ libly.$U = {//{{{
let restore = function () obj[name] = original;
if (autoRestore) {
let pluginPath = getPluginPath();
- if (!pluginPath)
- throw 'getPluginPath failed';
- restores[pluginPath] =
- (restores[pluginPath] || []).filter(
- function (res) (
- res.object != obj ||
- res.name != name ||
- (res.restore() && false)
- )
- );
- restores[pluginPath].push({
- object: obj,
- name: name,
- restore: restore
- });
+ if (pluginPath) {
+ restores[pluginPath] =
+ (restores[pluginPath] || []).filter(
+ function (res) (
+ res.object != obj ||
+ res.name != name ||
+ (res.restore() && false)
+ )
+ );
+ restores[pluginPath].push({
+ object: obj,
+ name: name,
+ restore: restore
+ });
+ } else {
+ liberator.echoerr('getPluginPath failed');
+ }
}
original = obj[name];
let current = obj[name] = function () {
--
cgit v1.2.3